|
From: <ef...@gm...> - 2002-01-17 13:03:55
|
Hi, >> > getdate %Y%m%d >> > this works fine on NT/2K, but with W9x it doesnt work; >> > seems that command.com breaks the argument when the second % appears. >> > >> > any ideas? >> > >> >> Yes. %Y% get's translated to mean the value of environment variable Y >> leaving m%d (or perhaps just m) passed to getdate. I don't know why it >> would work on NT/2K, IMO, it should fail there also but I haven't tried >> it. >> >> Earnie. >> > It does work on NT, using either cmd.exe or NT version of command.com. > Have > you tried enclosing string in quotes? > getdate "%Y%d%m" yes, all; with one, two, three and four quotes... have also just tested this: SET TFORM=3D%Y%m%d with W98 the environment var has as value only 'm%d'; but with NT this wor= ks also... seems that the only workaround for W9x is using another character instead = of % and then substitute in the program... or hardcoding some format strings and then select with a switch; grrrr.... Thanks, Guenter. |