rem Datum        Wer     Info
rem 06.04.2017   J.Fes   #New: First rel

rem #Exa: call DateTimeNowGet "C:\Temp\Dir1\Test.txt" TestVar
rem #Exa: cmdUti_DateTimeNowGet.cmd Test_DPNE "C:\Temp\Test" _$log.txt
rem       set XX_Log=#Name#_%$DateTimeNowFileExt%_log.txt
rem #Doc: after call folowing vars exiting then $DateYYYY $DateMM $DateDD $timeHH $timeMM $DateTimeNowFileExt


 set $DateYYYY=%Date:~-4,4%
 set $DateMM=%Date:~-7,2%
 set $DateDD=%Date:~-10,2%

 if "%time:~0,1%" equ " " set $timeHH=0%time:~1,1%
 if "%time:~0,1%" neq " " set $timeHH=%time:~0,2%

 if "%time:~3,1%" equ " " set $timeMM=0%time:~4,1%
 if "%time:~3,1%" neq " " set $timeMM=%time:~3,2%


 set $DateTimeNowFileExt=%$DateYYYY%-%$DateMM%-%$DateDD%-%$timeHH%-%$timeMM%

 if "%~3" neq "" set %~1=%~2_%$DateTimeNowFileExt%%~3

 goto :eof
