set dt=%date:~0,4%-%date:~5,2%-%date:~8,2%-%time:~0,2%:%time:~3,2%:%time:~6,2%
echo %dt%
不用设置变量直接输出也行
set dt=%date:~0,4%-%date:~5,2%-%date:~8,2%-%time:~0,2%:%time:~3,2%:%time:~6,2%
echo %dt%
不用设置变量直接输出也行
set dt=%date:~0,4%-%date:~5,2%-%date:~8,2%-%time:~0,2%:%time:~3,2%:%time:~6,2%
echo %dt%
不用设置变量直接输出也行
set dt=%date:~0,4%-%date:~5,2%-%date:~8,2%-%time:~0,2%:%time:~3,2%:%time:~6,2%
echo %dt%
不用设置变量直接输出也行