Time
Updated: January 21, 2005
Syntax
Parameters
Remarks
- When using time without parameters, press ENTER to keep the same time.
-
Using the /t parameter
The /t command-line option is only available if command extensions are enabled (that is, the default). For more information about enabling and disabling command extensions, see cmd in Related Topics.
- Specifying an invalid time format
If you specify the time in an invalid format the following message is displayed and the system then waits for you to enter the time in the correct format:
Invalid time
Enter new time:
- Changing the time format
You can change the time format by changing the setting in Date and Time in Control Panel. For just the MS-DOS subsystem, change the country setting in your Config.nt file. Depending on the Country/Region selected, time is displayed in the 12-hour format or the 24-hour format. If you are setting the time in the 12-hour format, specify P for hours after noon.
Examples
time 13:36
time 1:36P
Formatting legend
Format | Meaning |
Italic | Information that the user must supply |
Bold | Elements that the user must type exactly as shown |
Ellipsis (...) | Parameter that can be repeated several times in a command line |
Between brackets ([]) | Optional items |
Between braces ({}); choices separated by pipe (|). Example: {even|odd} | Set of choices from which the user must choose only one |
Courier font | Code or program output |