Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Is NT 2000 Dos Batch Timestamp sysntax different ?
This works on Win2K. Have not tested it on WinNT.
Use %%VAR for batch file. Use %VAR for command line.
For Date_Timestamp
set time_stamp=. FOR /F "tokens=1-3 delims= " %%A in ("%date%_%time%") do set time_stamp=%%B%%C FOR /F "tokens=1-3 delims=/" %%A in ("%time_stamp%") do set time_stamp=%%A%%B%%C FOR /F "tokens=1-3 delims=:" %%A in ("%time_stamp%") do set time_stamp=%%A%%B%%C FOR /F "tokens=1-2 delims=." %%A in ("%time_stamp%") do set time_stamp=%%A%%BC:\> echo %time_stamp%
For just Datestamp
set date_stamp=. FOR /F "tokens=1-3 delims= " %%A in ("%date%") do set date_stamp=%%B FOR /F "tokens=1-3 delims=/" %%A in ("%date_stamp%") do set date_stamp=%%A%%B%%CC:\> echo %date_stamp%
/Rauf Sarwar Received on Wed Oct 09 2002 - 19:21:37 CDT
![]() |
![]() |