144
MS-DOS User's Reference
Date Date
Purpose:
Enters
or
changes the date known
to
the
system.
Syntax:
date
[mm-dd-yy 1
Comments:
You can change the date from your terminal
or
from a batch file.
(MS-DOS
does
not
automatically display a
prompt
for
the
date
if
you use an autoexec.
bat
file, so you may want
to
include a
date
command in that file.) MS-DOS records this date in
the
directory
when
you create
or
change a file.
Remember
to
use only numbers
when
you type
the
date; allowed
numbers are:
mm
=
1-12
dd
=
1-31
y.y
=
80-99
or
1980-2099
The date, month, and year entries may
be
separated by hyphens
(-)
or
slashes
(/).
MS-DOS
is
programmed
to
change months and
years correctly,
whether
the
month has 31, 30,
or
28
days-or
29
days, since MS-DOS handles leap years, too.
lt
is
possible for you
to
change
the
mm-dd-y'y format in which
the
date is displayed and entered. The
country
command in
the
config.sys file allows you
to
change
the
date format
to
the
Euro-
pean standard
dd-mm-yy. For
more
information
on
the
config.sys
file,
see
Appendix
B,
"How
to
Configure Your System."
Examples:
Displaying
the
current
If
you simply type
the
date
command, MS-DOS displays
the
follow-
date ing message:
Current
date
i5
weekday
mm-dd-yy
Enter
new
date
(mm-dd-yy):_
If
you
do
not
want
to
change the date shown, press
the
RETURN
key.·Or you can type a particular date after
the
date
command, as
in
the
following example:
date
3-9-86
In this case
the
"Enter
new
date:"
prompt
does
not
appear after
you press
RETURN.
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[-