Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Timestamp calculations? Help?!


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

Recommended Posts

Posted

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

Posted

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

Posted

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

This topic is 6552 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.