I will skip right to the good stuff.
Here are some easy Date/Time variables for a batch file.
[code lang=”powershell”]
@echo off
::Day
set d=%date:~7,2%
set DD=%date:~0,3%
::Month
set m=%date:~4,2%
::Year
set YY=%date:~10,4%
set y=%date:~12,2%
::Time
set H=%time:~0,2%
set i=%time:~3,2%
set s=%time:~6,2%
set ms=%time:~9,2%
::
echo d: %d%
echo DD: %DD%
echo m: %m%
echo YY: %YY%
echo y: %y%
echo H: %H%
echo i: %i%
echo s: %s%
echo ms: %ms%
[/code]
Will Output
[code lang=”text”]
d: 24
DD: Wed
m: 02
YY: 2010
y: 10
H: 14
i: 36
s: 32
ms: 18
[/code]
Hope it helps.