Decimal time

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.
 
A

Allen Browne

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.
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top