DATE — Display or set the date

Synopsis

DATE [/?] [/F string] [/LOCALFORMAT] [/UTC] [/N] [date]

Options

/?
Display command syntax information.
/N
Do not prompt for a new date.
/F
Specify a format string for the date.

Note: The DATE command always precedes the date with the text of system message number 1050. This may not be desired. To print the date without any extraneous text, use the SAYDATE command from the OS/2 Command Line Utilities version 2.0.

/LOCALFORMAT
Use the local country's date and time formats.
/UTC
Display the time in UTC rather than local time, and default to UTC if the input date does not have an explicit timezone.

Description

The DATE command either displays or sets the current date. Without an argument, it displays the current date to standard output, and prompts for the new date from its standard input, to which it then sets the clock. If the /N option is used, the prompt for a new date is suppressed and the date is not changed. If an argument is supplied, that is used as the new date, and again no prompt is issued.

The date is displayed in the standard ISO 8601 format, with a full 4-digit year, unless the /L option is used. If the /L option is used, the format of the date is determined by the current country, which on OS/2 Warp is determined by the COUNTRY.SYS file and the COUNTRY directive in CONFIG.SYS.

If the date passed on the command, or entered at the prompt, is not in the standard ISO 8601 format, DATE will attempt to parse it as if it is in the format determined by the current country.

TIME


The 32-bit Command Interpreter is © Copyright Jonathan de Boyne Pollard. "Moral" rights are asserted.