Working Time calculation - from text to short time

  • Thread starter Thread starter Nancy Tang
  • Start date Start date
N

Nancy Tang

I would like to generate report for those who late to work. But the database
time is in text format, so i change it to short time using code as below. Is
it correct ? & how do i set a calculation for total time late in HH:MM:SS
as my working time is 09:00

Format(IIf(IsNull([dbo_Punctual.TrTime]),#12/30/2010#,[dbo_Punctual.TrTime]),'Short Time') AS [TRANSACTION TIME]
 
Nancy Tang said:
I would like to generate report for those who late to work. But the
database
time is in text format, so i change it to short time using code as below.
Is
it correct ? & how do i set a calculation for total time late in
HH:MM:SS
as my working time is 09:00

Format(IIf(IsNull([dbo_Punctual.TrTime]),#12/30/2010#,[dbo_Punctual.TrTime]),'Short
Time') AS [TRANSACTION TIME]
 
Try

Format(IIf(IsNull([dbo_Punctual.TrTime]),#12/30/2010#,CDate([dbo_Punctual.TrTime])),'Short
Time') AS [TRANSACTION TIME]
 
Back
Top