K
Kurt
In a query, I need to calculate the elapsed time (in hours and
minutes) between two times (which may span midnight), and round to the
nearest quarter. I will later multiply the elapsed time by an hourly
rate to calculate an amount due.
StartTime and EndTime are both Date/Time fields in Medium Time format.
To calculate the elapsed time, I'm using this:
TotalHrs: Format([StartTime]-1-[EndTime],"Short Time")
But I take it this produces a string (e.g., "01:20"), which means I
can't round it, nor use it in a subsequent calculation. Is there a
better way to go about this? I've tried the DateDif function but if
the difference spans midnight it always miscalculates.
Thanks.
minutes) between two times (which may span midnight), and round to the
nearest quarter. I will later multiply the elapsed time by an hourly
rate to calculate an amount due.
StartTime and EndTime are both Date/Time fields in Medium Time format.
To calculate the elapsed time, I'm using this:
TotalHrs: Format([StartTime]-1-[EndTime],"Short Time")
But I take it this produces a string (e.g., "01:20"), which means I
can't round it, nor use it in a subsequent calculation. Is there a
better way to go about this? I've tried the DateDif function but if
the difference spans midnight it always miscalculates.
Thanks.