This command displays or sets the system date and time of day
Date [date_time]
Prerequisites
None
Parameters
date_time
An optional string value that specifies the new date and time to be set. If omitted, the current date and time are displayed. The string format is: mm-dd-yyyy hh:mm:ss where:
mm is the month, from 1 to 12.
dd is the day of the month, from 1 to 31.
yyyy is the year. If yyyy is < 1000, the year yyyy+2000 is assumed.
hh is the hour of the day, from 0 to 23.
mm is the minute of the hour, from 0 to 59.
ss is the second of the minute from 0 to 59.If ether the entire date or time sub-field is omitted, the omitted sub-field value is not change. If the seconds field is omitted, the seconds are not changed.
Remarks
The displayed date is in the same format as the optional date_time parameter:
mm-dd-yyyy hh:mm:ss
Examples
date
01-24-2014 10:30:11' Display the current date-time
date 1-24-2014 11:25:00
' Change date and time
date 1-25-2014
' Change the date but not the time
date 13:50:30
' Change the time but not the date
See Also