Hi,
Sorry for the newbie question, but is there a command to format date within MS? I want to 0 pad the date and time I'm getting whenever I call on the getdate function e.x 07272014 01:05:01 AM
Thanks!
Date formatting
Moderators: JRL, Dorian (MJT support)
Re: Date formatting
GetDate and GetTime won't give you 0 padded date/time. Use VBScript instead.
Code: Select all
VBEval>Year(now) & "-" & Right("0" & Month(now),2) & "-" & Right("0" & Day(now),2),PaddedDashDate
VBEval>Year(now) & "/" & Right("0" & Month(now),2) & "/" & Right("0" & Day(now),2),PaddedSlashDate
VBEval>Right("0" & Hour(now),2) & ":" & Right("0" & Minute(now),2) & ":" & Right("0" & Second(now),2),PaddedColonTime