is it possible to set time /t and date /t as a VAR to use as
@echo off
set TIJD=time /T
set DATUM=date /T
echo %TIJD% %DATUM%
pause
built-in env vars: %TIME% %DATE%
echo %DATE% %TIME%
if you need to further manipulate the values, you can assign these to other variables, to which you can do other operations:
setlocal
set D=%DATE%
set T=%TIME%
echo %D:~10,4%%D:~4,2%%D:~7,2%%T:~,2%%T:~3,2%%T:~6,2%
The output of echo above will be locale dependent, but for me yields, e.g., 20150117144508.
set TimeStr=%Time::= %
Echo TimeStr
takes out ilegal characters from Time (replacing the colon with a space).
%date% to make the answer complete)