Jump to content
Sign in to follow this  
Santana

Date format

Recommended Posts

Santana

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
weaponx

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.