@ECHO OFF
for /F "tokens=1-4 delims=/ " %%i in ('date /t') do (
set DayOfWeek=%%l
set Month=%%j
set Day=%%k
set Year=%%i
set Date=%%i-%%j-%%k
)
ECHO Date is %Date%
@ECHO OFF
for /F "tokens=1-4 delims=/ " %%i in ('date /t') do (
set DayOfWeek=%%l
set Month=%%j
set Day=%%k
set Year=%%i
set Date=%%i-%%j-%%k
)
ECHO Date is %Date%