Santana Posted June 10, 2009 Share Posted June 10, 2009 Well, its me again. can anyone tell me how to format dates as YYYYMMDD? I tried @YEAR & @MON & @MDAY but cannot get the leading zeros which I need to match some files that include the date in that format. also, with the approach I took i may have issues at the begining of each month since all files are a day behind I may run into problems because the lengh of each month is not the same in most cases. Again, thanks for any input. Just another special date with a different challenge Link to comment Share on other sites More sharing options...
Valuater Posted June 10, 2009 Share Posted June 10, 2009 Example... $result = StringFormat("%04d-%02d-%02d\n", 2008, 4, 1) MsgBox(4096, "Test", $result) 8) Link to comment Share on other sites More sharing options...
weaponx Posted June 10, 2009 Share Posted June 10, 2009 A little late but... $d = StringFormat("%i%02i%02i",@YEAR,@MON,@MDAY) MsgBox(0,"",$d) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now