capturing date from cmd prompt NT4 - TechRepublic
General discussion
May 24, 2001 at 03:36 AM
kimba1

capturing date from cmd prompt NT4

by kimba1 . Updated 24 years, 11 months ago

I have an NT shell script I developed on Windows2000 Professional. In this cmd environment I can get the current date returned to me by issuing the following command: C:>echo %date% This returns:
Thu 05/24/2001. I then break it down into the tokensthat I need in my script and save the different parts of date into variables.
In NT4 the current date is not returned by enclosing in %date%. How can I get the current date in NT4 from within a shell script?

Any ideas would be much appreciated!

Thanks.

This discussion is locked

All Comments