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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format TIME Grief 1

Status
Not open for further replies.

tomco22

Technical User
Sep 16, 2000
74
US
I want to format my time to display in MILITARY TIME! That's not asking a lot. I want 8:02 AM to display as "0802". I want 10:15 PM to display as "2215". I will even accept the insertion of the colon, if I must.

When I tried "Short Time" I am offered an example of "17:34" but the resulting display is "17:34:00". NOT WHAT I WANT!. I tried a format of hhnn and that doesn't work either. Any suggestions to format my time to military format like: "0502" ? I prefer leading zeros for the hours and no seconds. My control source is:

Code:
=[cboHourName].Column(1)


Tom
MCSD
I Nab Terrorists
 
And this ?
=Format([cboHourName].Column(1), "hhnn")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
BINGO!

Thanks PH.

Tom
MCSD
I Nab Terrorists
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top