Converting Times into Numeric

B

bmils

How do I convert a 24 hour clock into a number...for instance...I am entering in a start time of 15:00 and an end time of 16:30...The difference that I am calculating is 1:30...how do i convert this into 1.5 hours?

Thanks in advance
 
A

Allen Browne

Type this into the Field row of a query:
Hours: DateDiff("n", [Startime], [Endtime]) / 60

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

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

bmils said:
How do I convert a 24 hour clock into a number...for instance...I am
entering in a start time of 15:00 and an end time of 16:30...The difference
that I am calculating is 1:30...how do i convert this into 1.5 hours?
 
B

Bruce M. Thompson

How do I convert a 24 hour clock into a number...for instance...I am entering
in a start time of 15:00 and an end time of 16:30...The difference that I am
calculating is 1:30...how do i convert this into 1.5 hours?

From the debug window:

? (timevalue("16:30")-timevalue("15:00"))*24
1.5
 

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