Show date in order I want it to
Posted: 12 Sep 2018 01:25
Hi
I have this code, that I got from the internet, but the date is in the wrong order, how can I change it to show DD/MMMM/YYYY.
I have this code, that I got from the internet, but the date is in the wrong order, how can I change it to show DD/MMMM/YYYY.
Code: Select all
@echo off
set /p host=host Address:
set logfile=Log_%host%.log
echo Target Host = %host%
for /f "tokens=*" %%A in ('ping %host% -n 1 ') do (echo %%A && GOTO Ping)
:Ping
for /f "tokens=* skip=2" %%A in ('ping %host% -n 1 ') do (
echo %date% %time:~0,2%:%time:~3,2%:%time:~6,2% %%A
timeout 1 >NUL
GOTO Ping)