Windows 10

Batch File To Get and Set System Date

In this tutorial, we are going to see how to get and set the system date. The batch file contains a series of DOS (Disk Operating System) instructions. It allows triggering the execution of commands found in this file.
 

Batch File To Get System Date

The following example get the system date:

@echo off

echo %date%

Output:

Wed 10/06/2021

 

 

Batch File To Set System Date

The following example set the system date to 15-02-2022 using date command:

@echo off

date 15-02-2022

Leave a Reply

Your email address will not be published. Required fields are marked *