Batch File in Windows For Oracle With Date and Time
Batch File in Windows For Oracle With Date and Time
setlocal
for /f "tokens=1-4 delims=/ " %%a in ('date /t') do set DATE=%%c-%%b-%%d
for /f "tokens=1-3 delims=: " %%a in ('time /t') do (
set hours=%%a
set minutes=%%b
set ampm=%%c
)
if {%ampm%}=={AM} if {%hours%}=={12} set hours=00
if {%ampm%}=={PM} (
for /f "delims=0 tokens=*" %%a in ("%hours%") do set hours=%%a
set /a hours+= 12
)
exit
output: