
reliable date formatting unrelated to regional settings
You need to do your own zero padding...
--
Michael Harris
MVP Scripting
Hi. I want a date (really a string) in the format YYMMDD. NT Regional
settings can change (do not even ask me why they keep changing the regional
settings. I have no idea).
My idea is
Var = DatePart("yyyy", Date()) & DatePart("m", Date()) & DatePart("d",
Date())
Now - will DatePart return the max number of chars for each part (regardless
of any regional settings)? Or do I need to test if the year "01" to make it
"2001?"
Thanks
S