I am having an issue where I am trying to calculate the time difference in seconds and then in a report (Access reports) I will sum those seconds and format it into hh:nn:ss.
However, my calculated field that gathers the time difference between the two fields sometimes exceeds 24 hours and thus throws off the time difference.
I am using the DateDiff function --- DateDiff("s",[BeginningTime],[EndingTime])
What should I do when it comes to circumstances where the time exceeds 24 hours?
The two fields, BeginningTime and EndingTime, are stored in the AM/PM format. I don't think that should matter though.
You can use a function like this:
and this expression as ControlSource for your textbox:
However (see comments) this simple expression is only valid for dates of positive numeric value which are dates after 1899-12-30.
To cover all dates, you will need a proper method for calculating a timespan, and that can be done using this function:
Then your expression will look like:
which for Gord's example values,
#1899-12-28 01:00:00#
and#1899-12-27 23:00:00#
, will return 2:00.