Hi guys,
I need some expert help about a problem I'm having with summing up times.
The times are given in by a mask "__:__" [/color green]. So the times range from "00:00" to "23:59".
With some help I made a table who tells the downtimes of a cell (it's for calculating downtimes of a machine).
So it's endtime - starttime.
The tables which hold the begintimes and endtimes are 'txtBeginStoring' and 'txtEindeStoring'.
The downtimes are calculated by using the following string:
IIf([txtBeginStoring]<=[txtEindeStoring],Format(CDate(Left([txtEindeStoring],2) & ":" & Right([txtEindeStoring],2) & ":00")-CDate(Left([txtBeginStoring],2) & ":" & Right([txtBeginStoring],2) & ":00"),"Short Time"),Format(1+CDate(Left([txtEindeStoring],2) & ":" & Right([txtEindeStoring],2) & ":00")-CDate(Left([txtBeginStoring],2) & ":" & Right([txtBeginStoring],2) & ":00"),"Short Time")) AS Downtime,
[/color green]
Now I need a total of all these calculated downtimes (thus a total of the downtime of a cell for a given day)
Can somebody help me with that?
thx
gaime
I need some expert help about a problem I'm having with summing up times.
The times are given in by a mask "__:__" [/color green]. So the times range from "00:00" to "23:59".
With some help I made a table who tells the downtimes of a cell (it's for calculating downtimes of a machine).
So it's endtime - starttime.
The tables which hold the begintimes and endtimes are 'txtBeginStoring' and 'txtEindeStoring'.
The downtimes are calculated by using the following string:
IIf([txtBeginStoring]<=[txtEindeStoring],Format(CDate(Left([txtEindeStoring],2) & ":" & Right([txtEindeStoring],2) & ":00")-CDate(Left([txtBeginStoring],2) & ":" & Right([txtBeginStoring],2) & ":00"),"Short Time"),Format(1+CDate(Left([txtEindeStoring],2) & ":" & Right([txtEindeStoring],2) & ":00")-CDate(Left([txtBeginStoring],2) & ":" & Right([txtBeginStoring],2) & ":00"),"Short Time")) AS Downtime,
[/color green]
Now I need a total of all these calculated downtimes (thus a total of the downtime of a cell for a given day)
Can somebody help me with that?
thx
gaime