B
BDB
Hi,
How do I get the system time like this:
YYYYMMDD
Can I do this with the date command?
Thanks.
How do I get the system time like this:
YYYYMMDD
Can I do this with the date command?
Thanks.
Hi,
How do I get the system time like this:
YYYYMMDD
Can I do this with the date command?
Hi,BDB said:Hi,
How do I get the system time like this:
YYYYMMDD
Can I do this with the date command?
In said:In microsoft.public.win2000.cmdprompt.admin BDB wrote:
How do I get the system time like this:
YYYYMMDD
Can I do this with the date command?
Control Panel|Regional Settings|Regional Options|Customize|Date
BDB said:How do I get the system time like this:
YYYYMMDD
[email protected] said:Hi,
I've kept this snippet which I found useful:
The following works for both "dd/mm/yyyy" and "mm/dd/yyyy":
@echo off
@rem NEWSGROUP: microsoft.public.win2000.cmdprompt.admin
@rem SUBJECT : How can i to get the current month in commandline?
@rem WHEN/WHO : Mar 14 2001, 9:05 pm post by Michael (maj0)
:: Tokenise date into dd mm and yy independent of locale
for /f "tokens=2-4 delims=.:/-, " %%i in ("%date%") do (
for /f "tokens=2-4 delims=/-,() skip=1" %%l in ('echo.^|date') do (
set %%l=%%i
set %%m=%%j
set %%n=%%k))
:: Lets see what we got!
for %%i in (dd mm yy) do set %%i
Bye,
Dennis Bareis