I use the following dos batch file, this is helpful when generating log files, that you want time stamped.
rem works with windows 2003 and xp
for /f "tokens=1-4 delims=/ " %%a in ('date /t') do (set weekday=%%a& set month=%%b& set day=%%c& set year=%%d)
echo day = %day%
echo month = %month%
echo year = %year%