You can access the current date in the virtual environment variable %date%. For example:
C:\>echo %date% 2008-03-04 C:\>
Sounds handy, right? Except for the fact that I run it on your machine and it says:
C:\>echo %date% 04/03/2008
C:\>echo %date% 03/04/2008
And in fact, there's no easy way from the command-line to find out what format the date is in, or to request a specific one. The setting is (in Windows XP) in the control panel, under "Regional and Language Options". And it's not even just a fixed list of options - a user can type in their own custom format. There's a sort of sense to this, until you realise that there's not a lot of use for %date% at the command-prompt. You can't dismantle it to find the day, month and year. You can't even use it in a file name, because it might contain backslashes! (Okay, that's not likely, but you can put them in to a customised date format in the control panel.) And if you print it into a log-file (as I do) then the log file might end up with a mix of different formats if the setting is ever changed.
It was while figuring this out that I discovered a further complication. If you have customised your date format, then later go into "Regional and Language Options", fiddle about with the controls, and then cancel, it will discard your customisation, and revert to the default for your region (which is DD/MM/YYYY for UK English). You wouldn't have thought that it would be hard to make a dialog box that just does nothing when you click cancel, but I guess you'd be wrong.