Why The Result Show Like 00:00, Access 2007

Joined
Jan 22, 2016
Messages
3
Reaction score
0
Hi All,

I have 5 textboxs:

1. startTime
2. startDate
3. endTime
4. endDate
5. TimeDiff (short time format)

i use these code in the TimeDiff textbox in the control source : =DateDiff("n";[FStartTime]+[FStartDate];[FEndTime]+[FEndDate]) , after i enter the first four entries, in the TimeDiff textbox the result appear to me as 00:00 and the result didn't save in the table, why the result appear to me as 00:00 and why it's didn't save in the table.

please help

Regards
 
Hi. The post is quite old, but I hope this will help somebody with similar issue. I see the problem here is that DateDiff("n",...) return integer that corresponds to number of minutes in the difference between two dates. It must be converted into minutes and seconds as follows:

Int(DateDiff("n",[FStartTime]+[FStartDate];[FEndTime]+[FEndDate])/60) & ":" & Format(DateDiff("n",[FStartTime]+[FStartDate];[FEndTime]+[FEndDate]) Mod 60, "00")
 
Back
Top