MS - DOS Date variable format

When i do this on my computer
echo %date%
it shows
Wed 10/05/2011

I am trying to extract month/date/year from that date

Now, i am tryign to run batch program and I want to extract date in form of MMDDYYYY from that date value.

So I do this -
set DATALOADDATE=%date:~4,2%%date:~7,2%%date:~10,4%

My question is will the format of date change on other machine, is the date format - Wed 10/05/2011 dependent on the Operating system or the way user has set to? Or it will be like this on all the machines?

thanks a lot..
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jian An LimSolutions ArchitectCommented:
good question
this settings is dependent on OS language of the computer.
Jian An LimSolutions ArchitectCommented:
I have use the method you wrote and havent come across anything yet. but again, it is not bullet proof :)

depends whether you need to complicate your code, or just use yours :)
at999Author Commented:

thanks for the info,

"this settings is dependent on OS language of the computer "  does it mean its different for US-English, French etc,... thanks
Jian An LimSolutions ArchitectCommented:
i am not sure about US-english and French, but my understand at least the korean, chinese will be very different because the FRI will be done local language, and US-english might done the date is MM.DD.YYYY

again. i would recommend you to run this over a few different OS language to confirm the settings.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Server OS

From novice to tech pro — start learning today.