Jump to content

Help with time calculations on a timeslip


This topic is 6080 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi Guys,

I'm confused by time calculations! I've looked through the forums for past posts and can find similar questions although the answers elude me.

I'm working on a timeslip layout. My fields are: Date, StartTime, EndTime, HoursWorked, HoursBilled, HourlyRate and a SubTotal. Hours Worked is the difference between the EndTime and Starttime (End_Time - Start_Time). The Subtotal is HoursBilled * HourlyRate.

What do I need to add to this calculation for it to return the correct result? If hours billed are 1.3, with an hourly rate of $40 the result is going to be $52, where it should be $60.

Should the HoursBilled be a time field, or number field? StartTime and EndTime are time fields.

Any help would be great, or just even a point in the right direction of similar posts to help me come to some clarity over Time in FMP...

Thank you

Link to comment
Share on other sites

Try this:

I used timestamp fields in case of working over day changes.

hoursworked is a time calculation. The subtotal is a number field.

starttime = timestamp

endtime = timestamp

hoursworked = endtime-starttime (time field)

hourlyrate = number field

subtotal = (hoursworked/3600) * hourlyrate

timecalc.zip

Link to comment
Share on other sites

Well, 1.3 * 4 = 52, so I don't see why "it should be $60".

HoursBilled can be be a Time field or a Number field - that's entirely up to you. If it's a Time field, a time of 90 minutes will be displayed as "1:30:00". If it's a Number field, it will be "1.5".

It's not clear how HoursBilled are derived from HoursWorked.

Link to comment
Share on other sites

Well, 1.3 * 4 = 52, so I don't see why "it should be $60".

It should be $60, because it's 1 1/2 hours of billable time. If I work it out on 1.5 hours then I'm billing for 1hour and 50minutes, but 1.3 equals 1hour and 30minutes.

But that's just my limited understanding of time in FMP.

Link to comment
Share on other sites

Ahh ok... This was were I was going wrong. I knew I had to divide something by 3600, and was dividing the entire calculation by 3600, rather than the time worked. It makes sense now, thank you very much.

I left the times as time fields rather than timestamps, as my work rarely crosses over a 24hour period. Fingers crossed it stays that way!!!

Link to comment
Share on other sites

I enter HoursBilled myself... I don't always Invoice for the total hours I've actually worked, depending on what I'm doing, and I bill for 15 minute blocks minimum, sometimes it may be a five minute job... I thought about rounding the totals off to reflect that I work in 15min increments but it wont always give me a true reflection of what I do.

Cheers :(

Link to comment
Share on other sites

I left the times as time fields rather than timestamps, as my work rarely crosses over a 24hour period. Fingers crossed it stays that way!!!

I would go ahead and use the timestamp just in case your work changes. That's what happened to me when we went from 1 shift to 3.

Link to comment
Share on other sites

Using timestamps is preferable, but not always convenient in terms of user interface. That's why I pointed to an alternative. As you correctly noted, it only works with a single midnight crossing. If that's not a safe assumption, you HAVE to use timestamps - or at least note the ending date separately.

Link to comment
Share on other sites

This topic is 6080 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.