getdate V1.10 (2009-02-26)

Function

Returns time/date info in DOS ERRORLEVEL.

Type

External MS-DOS program written in 8086 assembler

Format

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)

Comments

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).

Examples

getdate /M
if errorlevel 12 goto december

Author/Copyright

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.