Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

convert a number into time format

Status
Not open for further replies.

Whooo

Technical User
Jul 18, 2002
11
US
I have a long integer field that I would like to convert to a short time field.

the field is called start and it contains starting times such as 830 or 2300

I have tried several different steps with no luck. THanks for suggestions Cogito ergo sum - I think?
 
Im sure there is an easir way but?

?format(left(cstr(830),len(cstr(830))-2) & ":" & right(cstr(830),2),"hh:nn am/pm")
08:30 am

you would use

=format(left(cstr(start),len(cstr(start))-2) & ":" & right(cstr(start),2),"hh:nn am/pm")
 
thanks for your help it takes care of the formatting, Cogito ergo sum - I think?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top