henrywid Posted May 9, 2001 Posted May 9, 2001 Hi all. I need help with regards to creating a field which calculates the number of hours incurred. I am on FM5 btw. Anyway, I have to keep track of the number of hours incurred. So I have actually created 2 fields, namely: Time From & Time To. Time From is the starting time of work. Time to is the end time of work. So in order for me to calculate the number of hours worked, I will just created a new calculation field called Hours Worked = Time to - Time From. While this works great if u have the Time To greater than the Time From, this won't work if the hours happens at midnite. Say the person starts work at 11:30PM(Time From) and ends work at 6:30AM(Time To). The result of the Hours worked would actually be -17 hours, which is bogus. Anyone got a way around this? Thanks.
LiveOak Posted May 9, 2001 Posted May 9, 2001 Try: Delta Time (calculation, time) = Case( Time To >= Time From, Ttime To - Time From, Time To - Time From + Time(24, 0, 0)) Times must be entered as 24 hour times or with AM or PM suffix. -bd
Recommended Posts
This topic is 8584 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