Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / July 2006

Tip: Looking for answers? Try searching our database.

Decimal time

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Giangi - 25 Jul 2006 10:44 GMT
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.
Signature

Giangi El Dotor

Allen Browne - 25 Jul 2006 11:20 GMT
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.

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> 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.
Giangi - 25 Jul 2006 12:15 GMT
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.
Signature

Giangi El Dotor

> Assuming a field named Hours:
>     =Fix([Hours]) &  Format(60 * ([Hours] - Fix([Hours])), "\:00")
[quoted text clipped - 9 lines]
> > minutes in decimal (i.e. 6,83) in hh:mm (i.e. 6:50).
> > Thanks in advance for help.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.