Jump to content

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

Recommended Posts

Posted

I have a time field that automatically enters the time a job is started. I need to convert that time to 100unit hours. An example would be 2:30 pm would = 14:50, 9:45 am would = 9:75. I thought this would be easy but I am having trouble. Any ideas?

Posted

I wouldn't use a colon to delimit the new numbers, it causes confusion. Is 9:50, 9:50 or 9.5? Using a decimal point

NewTime (calculation, number) = Hour(Time) + Round(Minute(Time)/60, 2)

-bd

Posted

I'd also auto-enter the Date the job was started -- a start time is not really sufficient by itself for calculating elapsed time.

Posted

FileMaker actually stores time as the number of seconds since midnight. Thus 5:52:07 am is stored in its native state as the number 21127 (ie 21,127 seconds after midnight) and similarly 4:31pm is stored as 59460.

To express time as decimal hours, you need to place the time in a calculating field of result type number and divide it by 3,600. The resulting number returned will be the number of hours since midnight returned as a decimal fraction (you may want to round it to a manageable number of decimal places).

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