i have this code
SET date="%date:~10,4%-%date:~4,2%-%date:~7,2%"YYYY-MM-DD.
but i want
set date
dd-mm-yyyy
Hi
Just alter the format as below
It,s not good practice to change the %date% variable as it's used by the system.
@echo off
xDate=%Date%
SET Zdate="%xdate:~10,4%-%xdate:~4,2%-%xdate:~7,2%"
SET Zdate="%xdate:~4,2%-%xdate:~7,2%-%xdate:~10,4%"
echo %zdate%
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |