HTH
Matthias
SET /?
http://www.netikka.net/tsneti/info/tscmd001.htm
http://www.netikka.net/tsneti/info/tscmd008.htm#ask
http://www.netikka.net/tsneti/info/tscmd044.htm
http://www.netikka.net/tsneti/info/tscmd165.htm
http://www.netikka.net/tsneti/info/tscmd.htm#cmd1demo
etc etc
All the best, Timo
--
Prof. Timo Salmi mailto:t...@uwasa.fi ftp & http://garbo.uwasa.fi/
Hpage: http://www.uwasa.fi/laskentatoimi/english/personnel/salmitimo/
Department of Accounting and Finance, University of Vaasa, Finland
Useful CMD script tricks http://www.netikka.net/tsneti/info/tscmd.htm
The purpose is to take the date and time strings in the format that the
author expected and to return only some specific part of them, selected
by position, e.g. it omits the first six characters of the date and
returns the next four. It is probably intended to return the four-digit
year and the time in seconds (or maybe am/pm).
But be careful. Default US settings can be expected to give, for
%date%, mm/dd/yyyy and UK settings to give dd/mm/yyyy. But, while the
initial country setting sets a date format setting, that setting can
easily be changed in Control Panel. Mine is set to yyyy-mm-dd; so,
today, rather than getting 2008, I get 9-15.
The technique should only be used if you can be sure that all relevant
systems are and will remain set to the expected date (and time) format.
Otherwise, in on-topic systems (yours is off-topic, and you should have
used a.m.b.NT; see weekly "Batch file information and FAQs") you can use
NOWMINUS, via sig line 3; and in systems with WSH you can also use
JavaScript or VBScript to get the information unambiguously.
--
(c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05.
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
you can use vbscript to get date information, regardless of regional
settings on your computer.
theDate=Now
theYear=Year(theDate)
theMonth=Month(theDate)
WScript.Echo theYear,theMonth