On Sep 26, 7:47 am, Gina <naging...@hotmail.com> wrote:
> I want to find the elappsed time betwin StartTime and EndTime which
> are in a table. I can get the answer in a Form using the startTime
> and endTime with ' =([EndTime*1]-[StartTime]*24)', but the answer to
> that function naturally is in decimal hours. e.g. StartTime is 08:00,
> EndTime is 17:23 and the form result returns 9.5333333. That's great,
> the function works, but now I want to get it back in ti 'short time'
> fornat so that the answer to the example would read 9:23.
If the data is stored in date/time type fields, usae the datediff()
function to return the difference in minutes. Once you have that, you
use a user defined function to extract the number of hours, and the
number of minutes, then format each as two digit numbers.
=Format(datediff("n",startTime,EndTime)\60,"00") & ":" &
Format(datediff("n",startTime,EndTime) mod 60,"00")
|