Sign in to follow this  
Followers 0
Santana

Date format

3 posts in this topic

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

Share this post


Link to post
Share on other sites



Example...

$result = StringFormat("%04d-%02d-%02d\n", 2008, 4, 1)

MsgBox(4096, "Test", $result)

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

A little late but...

$d = StringFormat("%i%02i%02i",@YEAR,@MON,@MDAY)
MsgBox(0,"",$d)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0