Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
fname = format(date,"mmddyyyy")
might work for you. jeffP wrote: Hello all, I'm trying to get this to show leading zeros but I'm stuck. I'm using it to SaveAs a filename so it must be text without special characters, etc. It works fine except single days (1-9)would show poorly 642004 (June 4th) is hard to read and minutes are worse. Zero to 9 shows no leading 0 thus 8:05 PM would be 185 instead of military 1805. Any help would be appreciated. Dim fname As String Dim tname As String fname = Format$(month(Now()) & Day(Now()) & Year(Now()), "@@@@@@@@_") tname = Format$(Hour(Now()) & Minute(Now()), "@@@@_") -- jeff -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help with time formatting | Excel Discussion (Misc queries) | |||
Time formatting | Excel Worksheet Functions | |||
Formatting / Time | Excel Worksheet Functions | |||
time formatting and time categorizing (vlookup or data validation) | Excel Worksheet Functions | |||
time formatting and time categorizing (vlookup or data validation) | Excel Worksheet Functions |