Converting Time

C

Colin

Hi

Please can you advise if there is a function to convert a
time field HH:MM:SS to number of minutes?

Many Thanks

Colin
 
C

Colin

Hi I was not looking for the difference between two times
I was looking to convert HH:MM:SS to Minutes

EG 01:30:30 = 90.5 Minutes

Rgds Colin

-----Original Message-----
Try DateDiff, e.g.:
DateDiff("n", #0:00:00#, [MyDateTimeField])

More information:
http://members.iinet.net.au/~allenbrowne/casu-13.html

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

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

Please can you advise if there is a function to convert a
time field HH:MM:SS to number of minutes?

Many Thanks

Colin


.
 
A

Allen Browne

The Date/Time type in Access is stored as a number, where the integer part
represents the date, and the fraction represents the time. If your field
contains no date component, then the number of minutes is the difference
between zero and the contents of the field.

As an example, you can calculate the number of minutes represented in a
field that contains 2 hours 30 minutes, by opening the Immediate window
(Ctrl+G) and entering:
? DateDiff("n", #0:00:00#, #2:30 am#)

Please post back if I have not understood your issue here.

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

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

Colin said:
Hi I was not looking for the difference between two times
I was looking to convert HH:MM:SS to Minutes

EG 01:30:30 = 90.5 Minutes

Rgds Colin

-----Original Message-----
Try DateDiff, e.g.:
DateDiff("n", #0:00:00#, [MyDateTimeField])

More information:
http://members.iinet.net.au/~allenbrowne/casu-13.html


Please can you advise if there is a function to convert a
time field HH:MM:SS to number of minutes?

Many Thanks

Colin
 

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