close

echo %date% 結果為 yyyy/MM/dd
echo %date:~0,4% 結果為 yyyy
echo %date:~5,2% 結果為 MM
echo %date:~8,2% 結果為 dd

重點就在於 date 後 :~x,y 這個動作
x 代表從第幾個位置開始取
y 代表要取幾個字


arrow
arrow
    全站熱搜
    創作者介紹
    創作者 hweily 的頭像
    hweily

    hweily

    hweily 發表在 痞客邦 留言(0) 人氣()