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 / March 2008

Tip: Looking for answers? Try searching our database.

Convert hours:minutes to minutes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Scott - 03 Mar 2008 14:38 GMT
I have a calculated field in a query that returns the difference between two
times with a time format of h:nn; for example, one hour and thirty minutes is
displayed as 1:30.  I need the value of 1:30 displayed in minutes, so I need
to see the value as 90 minutes.  If I use the "n" format for minutes it only
returns the minutes without the hours so in the case of 1:30 it only returns
30 and not 90.  How do I format or calculate the field to return the value in
minutes so that 1:30=90, 2:45=165, 0:33=33?
Tom Lake - 03 Mar 2008 14:56 GMT
>I have a calculated field in a query that returns the difference between two
> times with a time format of h:nn; for example, one hour and thirty minutes is
[quoted text clipped - 3 lines]
> 30 and not 90.  How do I format or calculate the field to return the value in
> minutes so that 1:30=90, 2:45=165, 0:33=33?

Are you using n in a Format or in DateDiff?
Your DateDiff function can calculate the difference in minutes:

? datediff("n", #01:00#, #02:30#)
90

Tom Lake
Scott - 03 Mar 2008 15:04 GMT
I was using format.  I changed it to DateDiff as per your example and it
returned the minutes just like I was looking for!

Thank you,

Scott

> >I have a calculated field in a query that returns the difference between two
> > times with a time format of h:nn; for example, one hour and thirty minutes is
[quoted text clipped - 11 lines]
>
> Tom Lake
 
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.