Time Conversion

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

Hi Colin

As explained in your previous thread, open the Immediate window (Ctrl+G) and
enter:
? DateDiff("s", #0:00:00#, #1:30:30#) / 60

Note that DateDiff() returns only whole values, hence the need to ask for
seconds and divide by 60.

--
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
 
D

Douglas J. Steele

Since times are stored as a fraction of a day, you can just multiply the
time by 1440 (24*60: the number of minutes in a day):

?#1:30:30# * 1440
90.5


--
Doug Steele, Microsoft Access MVP

(No private e-mails, please)


Allen Browne said:
Hi Colin

As explained in your previous thread, open the Immediate window (Ctrl+G) and
enter:
? DateDiff("s", #0:00:00#, #1:30:30#) / 60

Note that DateDiff() returns only whole values, hence the need to ask for
seconds and divide by 60.

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

Guest

Cheers

Colin
-----Original Message-----
Since times are stored as a fraction of a day, you can just multiply the
time by 1440 (24*60: the number of minutes in a day):

?#1:30:30# * 1440
90.5


--
Doug Steele, Microsoft Access MVP

(No private e-mails, please)


Hi Colin

As explained in your previous thread, open the
Immediate window (Ctrl+G)
and
enter:
? DateDiff("s", #0:00:00#, #1:30:30#) / 60

Note that DateDiff() returns only whole values, hence the need to ask for
seconds and divide by 60.

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

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

message

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

Similar Threads


Top