"Offering free computer help, hints, and tips to the Internet populace." Now with over 3,820 tips!

Windows XP and DOS

Output the Date in a Batch File

SUMMARY: Two options for outputting the current date in a DOS batch file running underneath Windows XP.


 

Here are two ways to output the current date in a DOS batch file under Windows XP.

Use the DATE command with the "/t" parameter:

C:\>date /t

Windows XP comes built-in with a %date% environment variable.

C:\>echo %date%



Print This Tip

Get E-Mail When New Tips are Online

Return to the Windows XP and DOS page.

 


New in MalekTips:

RSS Feeds- Subscribe!

You want the latest tech tips and tricks in your e-mail Inbox - FREE? Type your e-mail address below and click 'Get Tips!'.
 


( sample / details )
( opt-out instructions )