批处理 %date:0,4%%date:5,2%%date:8,2%_%time:0,2%%time:3,2% 输出是 20120823_ 926 小时想变09怎办
问题描述:
批处理 %date:0,4%%date:5,2%%date:8,2%_%time:0,2%%time:3,2% 输出是 20120823_ 926 小时想变09怎办
答
set t=%date:~0,4%%date:~5,2%%date:~8,2%_%time:~0,2%%time:~3,2%
echo %t: =%