Returns time/date info in DOS ERRORLEVEL.
External MS-DOS program written in 8086 assembler
getdate /S | /T | /H | /U | /D | /W | /M | /Y
/Ssecond0..59/Tminute0..59/Hhour0..23/Uhhm0..235 (10 * hour + minute / 10)/Dday1..31/Wweekday1..7 (Sunday=1, Saturday=7)/Mmonth1..12/Yyear80..138 (add 1900)
getdate may be useful for timer switched PCs to determine the time and date they are started. Another use may be in login scripts (weekday).
getdate /M
if errorlevel 12 goto december
Copyright (C) 1991-2009 by Kostis Netzwerkberatung
Talstr. 25, D-63322 Rödermark, Tel. +49 6074 881056
kosta@kostis.net (Konstantinos Kostis), http://www.kostis.net/You may use this program free of charge at your own risk.