Change time by clicking on . bat in windows

21,956

Solution 1

use the time and date commands:

time 03:30:50
date 06/02/2011

Solution 2

Answer obtained from BlackBear and Joey:

Run cmd as Administrator Then type commands such as :

time 03:30:50 date 06/02/2011

Share:
21,956
Noor
Author by

Noor

Love programming, designing system, their architectures, fond of client side web programming using javascript frameworks such as angularjs, emberjs or other like GWT

Updated on February 07, 2020

Comments

  • Noor
    Noor over 4 years

    I am developing a system where several i'm having to change date to Sunday February 06 3:30:50 AM.

    Is there any way to create a .bat so that by clicking on it, the system automatically changes

  • Noor
    Noor over 13 years
    i'm using win 7, when i'm doing this , it is saying a required priviledge is not held by the client
  • BlackBear
    BlackBear over 13 years
  • Rich
    Rich over 13 years
    @Noor: Just run the batch file with administrative privileges. I.e. right-click and »Run as administrator«.
  • Kate Gregory
    Kate Gregory over 13 years
    Correct. You need to use your admin powers in order to change the system time.
  • BlackBear
    BlackBear over 12 years
    @Kate Gregory: yeah, it might be dangerous ;)
  • Sisir
    Sisir almost 3 years
    THis is simple and nice.. Can it be converted to a batch script in some way?