jim lee Posted December 15, 2006 Posted December 15, 2006 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
stanley Posted December 15, 2006 Posted December 15, 2006 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
mr_vodka Posted December 15, 2006 Posted December 15, 2006 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
jim lee Posted December 16, 2006 Author Posted December 16, 2006 Thanks!! That was just the ticket. Everything is working now. -jim lee
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now