Discussion Locked

date time stamp 4 dos app not working

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

WIN2000 using the below command gives the date and time but also says
"the system cannot except the date entered"
It used to work b4. We use this for stamping our backups and would like to know how to remove the line above in ""
@echo | more | date | find/v "new"
@echo | more | time | find/v "new"

3 replies

by beermonster

Hi,
I think I understand you. the 'date' \ 'time' commands by themselves echoe the date and time respectively, but also prompt for a new date and time from you. In your command, the date and time are displayed, but the OS then thinks that you are entering | find/v "new" as the new date \ time and errors out as that is the wrong format. you need to add the /t switch to the date \ time commands to stop this happening. Also, the entire structure of your command is outdated for win2k. if you want to echo the date and time simply use

echo date /t
echo time /t

This discussion is closed to new replies.