I have scripted iDate.bat to return your date order registry entry and date separator.

iDate.bat retrieves your date order from the iDate Value Name, using REG.EXE, built into Windows XP and Windows Server 2003, or REG.EXE from the Windows 2000 Support Tools on the CD-ROM, which must be available in your PATH, and the date separator from the sDate Value Name.

The syntax for using iDate.bat is:

\[call\] iDate iDT iDS


<b>iDT</b> is a <a href="/article/jsifaq/jsi-tip-5535-how-can-i-cause-a-called-batch-file-to-return-a-call-directed-environment-variable-.aspx">call directed environment variable</a> that will contain:
Value Order
0 m/d/y
1 d/m/y
2 y/m/d
3 Unknown
iDS is a call directed environment variable that will contain the date separator. iDate.bat contains:
@echo off
If \{%2\}==\{\} @echo Syntax: iDate iDT iDS&goto :EOF
set df=3
for /f "Tokens=2,3" %%x in ('REG QUERY "HKCU\Control Panel\International" /V iDate^|find /i "REG_SZ"') do (
 set df=%%y
set ds=#
for /f "Tokens=2,3" %%x in ('REG QUERY "HKCU\Control Panel\International" /V sDate^|find /i "REG_SZ"') do (
 set ds=%%y
endlocal&set %1=%df%&set %2=%ds%