Time Formatting

mohsinhq

Registered User.
Local time
Today, 12:10
Joined
Aug 2, 2004
Messages
90
i am trying to convert a time value that is currently in minutes to hours and minutes without luck so far.

This is the calculation for the initial value in minutes:

=DateDiff("n",[TxtDateRO],[TxtDateDel])

when i try to format into hh:nn i just get 00:00. The code i used is shown below:

=Format(DateDiff("n",[TxtDateRO],[TxtDateDel]),"hh:nn")

im trying to do this so that if a time value is less than 10 minutes. i.e one digit then it shows e.g. 00:05 and not just 5!

Any help/ideas is much appreciated.

Thanks in advance
 
tried that. didnt work. got the solution now:

=Int(CSng(([txtDateDel]-[txtdateRO])*24)) & ":" & Format(([txtDateDel]-[txtdateRO]),"nn")
 
If your interested try,
Format([TxtDateRO]-[TxtDateDel], "HH:NN")

Greetz
 

Users who are viewing this thread

Back
Top Bottom