Code: Select all
for /f %%i in ('WMIC OS Get LocalDateTime /value') do for /f %%j in ("%%i") do set "%%j"
set today=%LocalDateTime:~0,8%
Thanks
Moderator: DosItHelp
Code: Select all
for /f %%i in ('WMIC OS Get LocalDateTime /value') do for /f %%j in ("%%i") do set "%%j"
set today=%LocalDateTime:~0,8%