Help

Re: $/hour formula only giving (incorrect) cents instead of whole dollar amount?

Solved
Jump to Solution
1229 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Smote
5 - Automation Enthusiast
5 - Automation Enthusiast

Good morning!

I am trying to determine how much I am making per hour at various markets that I vend.

I input my markets with a start date+time field and an end date time field and have that calculate out to a duration field.

Smote_8-1698842569374.png   Smote_9-1698842624758.png

Smote_0-1698842037950.png  Smote_1-1698842054102.png

Smote_2-1698842074489.png  Smote_3-1698842088178.png

I also have my earnings field (which is what I made minus event fees, also calculated out).  *it's the "Minus Fees" column I'm using for my final calculations

Smote_10-1698842670377.png

Smote_4-1698842144186.png

Logically, I should just be able to do my earnings / duration = dollars per hour amount
or in my chart's terms: 
{minus fees} / {duration (show)} = $ per hour amount

Smote_5-1698842168454.png  Smote_12-1698842894092.png

However, instead of getting a nice dollar value, this is what I see:

Smote_11-1698842859322.png

Smote_6-1698842276712.png

I feel like I'm missing something incredibly obvious here because obviously,
$1,124.17 / 7 hours does not equal $0.04 cents. 
It should be $160.56.

Can someone spot where I've gone wrong?  

 

Thanks!

 

 

 

 

2 Solutions

Accepted Solutions
kuovonne
18 - Pluto
18 - Pluto

Thanks for the screenshots. 

It looks like you do not have units for your DATETIME_DIFF() formula. Since you want to display the result as a duration, you should explicitly use “seconds” as the units.

Duration fields are stored as a number of seconds. If you want dollars per hour, you need to convert seconds to hours. 1 hour is 3600 seconds.

Notice that $160.56/hour is the same as $0.0446/second, which rounds to $0.04

See Solution in Thread

Sho
11 - Venus
11 - Venus

"Duration Format" is the number of seconds.
For 7 hours, this would be 25200 seconds.

To convert seconds to hours, it needs to be multiplied by 3,600.

{minus fees} / {duration (show)} * 3600

 

See Solution in Thread

4 Replies 4
kuovonne
18 - Pluto
18 - Pluto

Thanks for the screenshots. 

It looks like you do not have units for your DATETIME_DIFF() formula. Since you want to display the result as a duration, you should explicitly use “seconds” as the units.

Duration fields are stored as a number of seconds. If you want dollars per hour, you need to convert seconds to hours. 1 hour is 3600 seconds.

Notice that $160.56/hour is the same as $0.0446/second, which rounds to $0.04

Smote
5 - Automation Enthusiast
5 - Automation Enthusiast

Oh!  Thank you so much - I had previously looked up the datetime_diff() and someone had mentioned not to include units!  

(Also didn't even consider that it was dividing by seconds, good catch!)  

Sho
11 - Venus
11 - Venus

"Duration Format" is the number of seconds.
For 7 hours, this would be 25200 seconds.

To convert seconds to hours, it needs to be multiplied by 3,600.

{minus fees} / {duration (show)} * 3600

 

Smote
5 - Automation Enthusiast
5 - Automation Enthusiast

This is actually what I ended up doing!