Convert Time to Decimal

  • Thread starter Thread starter V Terry
  • Start date Start date
V

V Terry

I'm trying to convert 02:15:00 or 15:00 into a decimal,
such as 2.25 or 0.25 any ideas?

Unfortunately the data is as above, not consistent in the
number of places, not always hours and minutes, just
minutes if less than an hour.

Thank you!
 
I'm trying to convert 02:15:00 or 15:00 into a decimal,
such as 2.25 or 0.25 any ideas?

Unfortunately the data is as above, not consistent in the
number of places, not always hours and minutes, just
minutes if less than an hour.

Thank you!

DecimalTime:DatePart("h",[TimeField]) &
Format(DatePart("n",[TimeField])/60,".00")
 
Works like a charm! I do have a problem if the original
time is over 24 hours, is there a variation for that
situation?

Thanks so much for passing on your knowledge!

Vickie Terry
-----Original Message-----
I'm trying to convert 02:15:00 or 15:00 into a decimal,
such as 2.25 or 0.25 any ideas?

Unfortunately the data is as above, not consistent in the
number of places, not always hours and minutes, just
minutes if less than an hour.

Thank you!

DecimalTime:DatePart("h",[TimeField]) &
Format(DatePart("n",[TimeField])/60,".00")
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
Back
Top