PDF download Download Article PDF download Download Article

This wikiHow teaches you how to change your time and date on a computer running the Windows operating system using the Command Prompt app.

Using Command Prompt to Change Time & Date

  1. Go to Time & Language in your Settings app.
  2. Click Date & time and switch off “Set time automatically.”
  3. Type “command prompt” into your Start menu and double-click to open the program.
  4. Click Run as administrator and allow the app to make changes to your device.
  5. Change the time by typing the command “time HH:MM:SS AM/PM.”
  6. Change the date by typing the command “date” → Enter → “MM-DD-YYYY.”
Part 1
Part 1 of 2:

Disabling Automatic Time and Date

PDF download Download Article
  1. While you can change your computer's time and date with Command Prompt while your computer's automatic time and date is active, your computer will eventually reset its time and date to match the current one.
    • In some cases, your computer will reset the time and date as soon as you close Command Prompt.
  2. Advertisement
  3. This option is in the middle of the Settings window.
  4. It's a tab in the upper-left side of the window.
  5. Advertisement
Part 2
Part 2 of 2:

Changing the Time and Date

PDF download Download Article
  1. Type in command prompt, then wait for Command Prompt to appear at the top of the Start menu.
  2. It's at the top of the Start menu. A drop-down menu will appear.
    • If your mouse doesn't have a right-click button, click the right side of the mouse, or use two fingers to click the mouse.
    • If your computer uses a trackpad instead of a mouse, use two fingers to tap the trackpad or press the bottom-right side of the trackpad.
  3. This option is in the drop-down menu.
    • You can't change your computer's time and date without administrator privileges.
  4. Doing so confirms that you want to open Command Prompt; you should see the Command Prompt window appear at this point.
  5. The command for changing time in Command Prompt is time HH:MM:SS AM/PM where "HH:MM:SS" refers to the hour, minute, and second, and "AM/PM" refers to whether it's morning or afternoon. To change your computer's time, type in this command with your preferred time indicated, then press Enter.
    • For example, typing in time 08:35:00 AM and pressing Enter would change your computer's time to 8:35 AM.
    • To change the time to 10:00 PM, you would type in time 10:00:00 PM and press Enter.
    • If you're comfortable with 24-hour time, you can type in your preferred time (e.g., 14:00:00 for 2:00 PM) and leave off the "AM" or "PM" tag.
  6. The date format you'll use in Command Prompt depends on your country, but Command Prompt will tell you which format to use: type in date and press Enter, then type in the date you want to use in whichever format is specified by Command Prompt (e.g., "mm-dd-yyyy" in the United States) and press Enter.
    • To change a United States computer's date to September 25th, 2018, you would type in date and press Enter, then type in 09-25-2018 and press Enter.
    • To adjust the date to read October 12th, 2018 on a European computer, you would type in date and press Enter, then enter either 12-10-2018 or 2018-10-12 depending on your location.
  7. In the bottom-right corner of the screen, you should see both your updated time and your updated date reflected in your region's format.
    • If you use 24-hour time, you won't see "AM" or "PM" listed here.
  8. Advertisement

Community Q&A

Search
Add New Question
  • Question
    I tried to change the time on my computer by using the command prompt, but it didn't work. What can I do?
    Community Answer
    Community Answer
    Try right clicking on the CMD icon and selecting "Run as administrator." Then follow the instructions again.
  • Question
    Can I change system time without administrator privileges?
    JLloyd
    JLloyd
    Community Answer
    Unfortunately, you can't—attempting to change the time and/or date without using Command Prompt in administrator mode will result in an error.
  • Question
    What if I want to set date and time settings as automatic so that it fetches the date and time from the internet?
    JLloyd
    JLloyd
    Community Answer
    Your computer already does this by default. If you turned off the automatic time and date setting, you can re-enable it from within Windows Settings by opening the Time & Language menu and clicking the "Off" switch next to the "Set time automatically" heading.
See more answers
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement

Tips

  • As long as you leave the automatic time and date feature disabled, your new time and date won't change back when you restart your computer.
Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!
Advertisement

Warnings

Advertisement

You Might Also Like

Change Computer BIOS Settings Change Computer BIOS Settings on a Windows PC: Guide
Change Directories in Command Prompt Navigate to a Different Folder in the Command Prompt
Format a USB Using Cmd Format a USB Using CMD (Command Prompt)
Change a Computer Password Using Command Prompt Change a Windows Password Using Command Prompt
Reboot from Command Prompt on WindowsReboot from Command Prompt on Windows
Use Windows Command Prompt to Run a Python FileUse Windows Command Prompt to Run a Python File
Run a Batch File from the Command Line on Windows Run a Windows Batch File from the Command Line (CMD)
Open a Folder in Cmd Open a Folder in Command Prompt (CMD)
Add Users from CMDAdd Users from CMD
Open Command Prompt with a Keyboard Shortcut (Windows 8, 8.1, and 10)3 Ways to Open Command Prompt with Keyboard on Windows
Open the Command Prompt in Windows5 Simple Ways to Open the Command Prompt in Windows
Watch Star Wars on Command Prompt Watch Star Wars via Telnet: Windows CMD & Mac Terminal
Copy Files in Command PromptCopy Files in Command Prompt
Use Net SendUse Net Send
Advertisement

About This Article

Jack Lloyd
Written by:
wikiHow Technology Writer
This article was co-authored by wikiHow staff writer, Jack Lloyd. Jack Lloyd is a Technology Writer and Editor for wikiHow. He has over two years of experience writing and editing technology-related articles. He is technology enthusiast and an English teacher. This article has been viewed 622,878 times.
How helpful is this?
Co-authors: 15
Updated: June 21, 2024
Views: 622,878
Categories: Command Prompt
Article SummaryX

1. Disable automatic date and time first.
2. Open the command prompt as an administrator.
3. Type "time" and press the space bar.
4. Enter the time in this format: 08:35:00 AM.
5. Press Enter.
6. Type "date" and press Enter.
7. Enter the date in the preferred format (e.g., MM-DD-YYYY).
8. Press Enter.

Did this summary help you?

Thanks to all authors for creating a page that has been read 622,878 times.

Is this article up to date?

Advertisement