How to make calculated field of hours and minutes like excel (1 Viewer)

rustamharman

New member
Local time
Today, 20:11
Joined
Feb 27, 2020
Messages
1
Hi I want to make input like excel for [h]:mm format and also final output in query to add as total
 

Ranman256

Well-known member
Local time
Today, 10:41
Joined
Apr 9, 2015
Messages
4,339
if you want to calc hours you need to DATE & TIME.
1/1/2020 8am & 1/1/2020 5pm ,
then use DateDiff("h",startDate, endDate)

using time alone wont work If you cross midnight.
The above works it both fields are on the same record.

if you have separate recs:
person, DateStamp
bob ,1/1/2020 8am,
bob, 1/1/2020 5pm ,

you must use vb to cycle thru the records, to calculate elapsed time.
i run a report by dumping my data range into a 'report' table, scan while writing the elapsed using the previous timestamp:
person, DateStamp, elapsed, units
bob ,1/1/2020 8am, 0
bob, 1/1/2020 5pm, 9, hrs
 

Users who are viewing this thread

Top Bottom