展开全部@echo off set year=date:~0,4% set month1=date:~5,1% set month2=date:~6,1% set day1=date:~8,1% set day2=date:~9,1% if%month1%equ 0(set month1=) if%day1%equ 0(set day1=) echo%year%-%month1%month2%-%day1%day2% pause不懂追问,满意给个采纳呗,想了半天呢 之前想用for循环 读入... 20210311