Hi,
I want to capture the current date in the format – Month-Day-Year (6-29-11).
Date gives output as 29-Jun-11 and I am modifying as below.
set month=%date:~3,3%
set Day=%date:~0,2%
set year=%date:~7,3%
if %month%==Jan set cmonth=1
if %month%==Feb set cmonth=2
if %month%==Mar set cmonth=3
if %month%==Apr set cmonth=4
if %month%==May set cmonth=5
if %month%==Jun set cmonth=6
if %month%==Jul set cmonth=7
if %month%==Aug set cmonth=8
if %month%==Sep set cmonth=9
if %month%==Oct set cmonth=10
if %month%==Nov set cmonth=11
if %month%==Dev set cmonth=12
Is there any way we can convert the months as numbers ??
Test this… Assumes your current date format is dd/mmm/yy
Please come back & tell us if your problem is resolved.