Friday, April 27, 2012

DATE - Dos Command :

It displays or sets the new date.
Command can be run using Microsoft Windows XP Command Prompt (cmd.exe)
To view 'date' command with its all possible parameters you can use following command. Its like help information to regarding that command.
date/?
Syntax :
 Date [/T | date]

Use 1:

date
The current date is: Tue 11/08/2011
Enter the new date: (mm-dd-yy) 11/12/2011

- 'date' command without parameters displays current system date setting and it prompts for a new one. You can change system date by entering new date or you can simply press ENTER to keep the same system date.

Output 1:


Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

D:\DINESH > date
The current date is: Tue 11/08/2011
Enter the new date: (mm-dd-yy) 11/12/2011

Use 2:

date /t
Sat 11/12/2011

- 'date' command with parameter /t, which tells the command to just output the current date only, without prompting for a new date.

Output 2:


Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

D:\DINESH > date /t
Sat 11/12/2011

D:\DINESH > 

No comments:

Post a Comment