Useful Tips

How to change the date and time on the computer through the command line?

DATE and TIME have a similar command line format and are used to display or change the current date or time.

DATE command line format:

The DATE command without parameters displays the current date and asks for a new date. To save the current date, press the ENTER key.

TIME Command Line Format:

Enter TIME without parameters to display the current time and request to enter a new time. Press the ENTER key to save the current time.

date - display the current date. Result:
Current date: 09/28/2012
Enter a new date (dd-mm-yy):

Set a new date value:

date / T 09/28/2012

Display current time:

Or the same, but with an interactive request:

Current time: 8: 20: 04.96
Enter new time: 8:30

Set a new time value via the command line parameter (without request):