date

Syntax

date[mm/dd{yy|yyyy}][-sfo]

Description

Displays or sets the current date for the system.

Options

mm

Specifies the month of the date to be set (1-12).

dd

Specifies the day of the date to be set (1-31).

yyyy

Specifies a four-digit year date.

-sfo

Specifies a standard formatted output display.

Usage

If no parameters are specified, the current date displays. If a valid month, day, and year are specified, the system's date is updated. Rules are:

  • Except for numeric characters and /, all other characters in the argument are invalid. The Shell reports an error if the number is in the wrong month/date/year range.

  • A space before or after the numeric character is not allowed. Inserting a space into the number is invalid.

  • The year range is greater than or equal to 1998. Two numeric characters indicate the year. Numbers below 98 are regarded as 20xx, and numbers equal to or above 98 are regarded as 19xx. 00 means 2000. For example:
Shell> date 8/4/97
Shell> date 
8/04/2097 
Shell> 
Shell> date 8/4/98 
Shell> date 08/04/1998
Shell>

The range of valid years is 1998–2099.

Examples

To display the current date in the system:

fs0:\> date 
06/18/2001

To set the date with a long year format and display it:

fs0:\> date 01/01/2050
fs0:\> date
01/01/2050

To set the date with a short year format and display it:

fs0:\> date 06/18/01
fs0:\> date
06/18/2001