什么意思,像这样?
@echo off
echo 当前时间:%date% %time%
echo.
set time1=%time: =0%
set time1=%time1::=-%
set time1=%time1:.=-%
echo 年、月、日、时、分、秒各两位:
set Text=%date:~2,8%-%time1:~0,8%
echo %Text%
echo 年四位,月、日、时、分、秒各两位
set Text=%date:~0,10%-%time1:~0,8%
echo %Text%
echo 月、日、时、分、秒、百分秒各两位
set Text=%date:~5,5%-%time1:~0,11%
echo %Text%
echo.&pause
set t=%time::=-%
echo %t:.=-%