DATE + Displaying the Current Date

Displays the current system date; allows you to enter a new

date.

VERSION

PC-DOS 2.0+ (revised from 1.1; revised again in PC-DOS

3.3)

MS-DOS equivalent: DATE (2.0+)

TYPE

Internal

SYNTAX

DATE [mm-dd-yy]

or

DATE [mmyy]

or

DATE [yy-mm-dd]

DATE allows you to reset the system date to the current date

or obtain the current date from the system clock.

EXAMPLES

DATE 1-1-88

sets the system date to Fri 1-01-1988. You may separate day,

month, and year with hyphens (-), slashes (/), or periods (.).

You do not need to type leading zeros.

DATE

returns the current date and prompts you for a new one.

MESSAGE

Invalid date

The date you entered used an invalid format. Check your entry

and try again.

UNDO

To reset the date, type

DATE

and enter the current date in one of the allowable formats.

NOTE

In version 3.3 of PC-DOS, if your computer has an internal

clock, the DATE command also resets it. (This is the inverse of

previous versions.) You can include the DATE command in an

AUTOEXEC.BAT file so that you are not prompted for the date when

you boot DOS. If there is no clock that DOS can read, the prompts

still come up. To change the date format, create a CONFIG.SYS

file that includes the COUNTRY command.

------------------------------------------------------------------

[For related topics, press R]

SEE ALSO

Batch Files

CONFIG.SYS File

TIME Command