Returns time/date info in DOS ERRORLEVEL.
External MS-DOS program written in 8086 assembler
getdate /S | /T | /H | /U | /D | /W | /M | /Y
/S
second
0..59
/T
minute
0..59
/H
hour
0..23
/U
hhm
0..235 (10 * hour + minute / 10)
/D
day
1..31
/W
weekday
1..7 (Sunday=1, Saturday=7)
/M
month
1..12
/Y
year
80..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.