Decimal time

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello members,
for readability of my users, I need transform a field that contain hours and
minutes in decimal (i.e. 6,83) in hh:mm (i.e. 6:50).
Thanks in advance for help.
 
Assuming a field named Hours:
=Fix([Hours]) & Format(60 * ([Hours] - Fix([Hours])), "\:00")

You could use:
= Format([Hours] / 24, "h:nn")
but that might be less accurate (rounding issues) and would have problems if
the time was over 24 hours.
 
Many thanks Allen: you have resolved my problem (first guesstimate is the
best because my data is over 24 hours -it's amount field-).
Good job.
--
Giangi El Dotor


Allen Browne said:
Assuming a field named Hours:
=Fix([Hours]) & Format(60 * ([Hours] - Fix([Hours])), "\:00")

You could use:
= Format([Hours] / 24, "h:nn")
but that might be less accurate (rounding issues) and would have problems if
the time was over 24 hours.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Giangi said:
Hello members,
for readability of my users, I need transform a field that contain hours
and
minutes in decimal (i.e. 6,83) in hh:mm (i.e. 6:50).
Thanks in advance for help.
 
Back
Top