Applying special format on a column

  • Thread starter Thread starter Guy Cohen
  • Start date Start date
G

Guy Cohen

Hi all,
(Using VB+ADO)
I have a table for phone calls monitor
Lets say I have tblCalls with fields:CallID, UserName, CallDuration
CallDuration is in seconds
I would like to show a table with the info but to format the CallDuration as
HH:MM:SS
e.g.: for duration 130 secods it will be 00:02:10

TIA
Guy

I wish there was "microsoft.public.sql.queries" or
"microsoft.public.sql.syntax" and not just "microsoft.public.access.queries"
 
If CallDuration never exceeds one day, you can fudge it using

Format(DateAdd("s",CallDuration,Date()),"hh:nn:ss")

Otherwise you will have to do the math and then concatenate the values together.

Seconds = CallDuration Mod 60
Minutes = CallDuration\60 Mod 60
Hours = CallDuration\3600
 
Back
Top