Jump to content

Timestamp calculations? Help?!


jim lee
 Share

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

Recommended Posts

I have to be missing something really obvious here.

I have fields timestamp1 & timestamp2 and I need something like this..

timestamp1 - timestamp2 = hours worked

So I can do the hours worked * rate calcualtion. But for the life of me I can not figure out how to do timestamp math with filemaker.

Help? please?

Thanks!

-jim lee

Link to comment
Share on other sites

Jim:

Timestamps are calculated in seconds, so to show the number of hours' difference between two timestamps you would do:

(ModificationTimestamp - CreationTimestamp) / 3600

This is the time difference / (60 secs x 60 minutes), to put it into hourly terms.

-Stanley

Link to comment
Share on other sites

Lets say you have the following fields:

timestamp_start

timestamp_end

rate

A calc field can be used to calculate the total amount of hours and minutes worked. It would be timestamp_end - timestamp_start, with a Time result. Lets call this cTimeWorked

Then to calculate the rate, you have to determine how many minutes are relevent to what you consider as being payable. So since most contracters bill to the last quarter hour, we can accommdate for that.

Here is the calc you can use for it.

Hour ( cTimeWorked ) * rate + 

Div ( Minute ( cTimeWorked ); 15 ) * .25 * rate

Link to comment
Share on other sites

This topic is 5773 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
 Share

×
×
  • Create New...

Important Information

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