The date command in Windows
The date command displays or sets the system date. If used without parameters, the date command displays the current system date setting and prompts you to enter a new date.
For an example of how to use this command, please see the Example below.
Syntax date command
date [/t | ]
Parameters
The Description parameter is set, in which Month is the month (one or two digits), Day is the date (one or two digits) and Year is the year (two or four digits). / t Display the current date without prompting the user to enter a new date. /? Show help at the command prompt.Note
- To change the current date, you must have admin login information.
- You must separate the values for Month , Day and Year by dots (.), Hyphens (-) or slashes (/).
- Valid Month values are from 1 to 12.
- Valid Day value is from 1 to 31.
- Valid Year values are from 00 to 99 or 1980 to 2099. If you use two digits, the values from 80 to 99 correspond to the years 1980 to 1999.
For example
If the command extensions are enabled, to display the current system date, enter:
date /t
To change the current system date to August 3, 2007, you can enter any of the following information:
date 08.03.2007 date 08-03-07 date 8/3/07
To display the current system date, followed by a prompt to enter a new date, enter:
The current date is: Mon 04/02/2007 Enter the new date: (mm-dd-yy)
To keep the current date and return to the command prompt, press ENTER. To change the current date, enter the new date and then press ENTER.
See more:
- Cscript command in Windows
- Compact command in Windows
- The dfsrmig command in Windows
4.5 ★ | 2 Vote
You should read it
May be interested
- Del command in Windowsthe del command deletes one or more files. this command is the same as the eraser command.
- How to fix the date #VALUE error in Excelwhen entering a date-related formula in excel, some people are reported with the #value error, affecting the results in excel files.
- 10 useful commands in Windows you should knowcommand prompt is used to execute batch files, perform tasks quickly, help you troubleshoot and solve some windows problems when the system crashes. however, not all commands in windows are useful and must be done regularly. with the 10 command lines in the following article it is very useful even if you are not an administrator.
- How to use the option equivalent to the 'ls' command in Windowsthe 'ls' command (note ls, not is) is one of the first terminal commands veterans teach to linux beginners.
- The command reg add in Windowsthe reg add command adds new subkeys or entries to the registry.
- Rem command in Windowsthe rem command helps write comments (comments) in a batch file or config.sys.
- How to change the date and time format on Windows?by default, windows date format uses slashes (such as 3/27/16). however, you can change the slash to a slow mark (such as 3.28.16) as in excel.
- Instructions for using Command Promptdeep in windows is a command-line world that is obscure. in this article, we will show you how to solve errors and make your computer more secure.
- Rd command in Windowsthe rd command helps delete a directory
- How to display full date and time on Windows 11 Taskbarrecent windows updates have changed the way the condensed date and time is displayed. if your computer is experiencing this, follow the article below to display the full date and time on the windows 11 taskbar.