Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: DOS question

Re: DOS question

From: Yechiel Adar <adar76_at_inter.net.il>
Date: Mon, 6 Dec 2004 20:01:34 +0200
Message-ID: <020001c4dbbd$9f8df8c0$e300a8c0@user12344>


I just did: ECHO %DATE% and ECHO %TIME% on win2000 and win2003 and got the correct date and time.
Do HELP SET in a dos box and you will see in the end that if Command Extention are enabled %date% and %time% works.

Yechiel Adar
Mehish Computer Services
----- Original Message -----
From: "Branimir Petrovic" <BranimirP_at_cpas.com> To: <Oracle-L_at_freelists.org>
Sent: Thursday, December 02, 2004 3:36 PM Subject: RE: DOS question

> While quite an accomplishment considering DOS batch shortcomings,
> env. variables %date% and %time% are unknowns on NT 4, therefore
> the trick can not be successfully applied in WinNT4-Win2K3 range.
>
> After let's say "interesting" day yesterday at customer's site
> and the way some environment variables are/aren't available with
> scheduled scripts on NT4, I am more convinced than ever that any
> reliance on Windows DOS batch-ing and/or native (*.wsf, *.vbs,
> *.js) scripting should be avoided like a plague...
>
> Branimir
>
>
> > -----Original Message-----
> > From: Alexander.Feinstein_at_mitchell1.com
> >
> >
> > Here is another alternate that works:
> >
> > for /F "tokens=3D1-4 delims=3D/ " %%o in ("%DATE%") do (
> > set MM=3D%%p
> > set DD=3D%%q
> > set YY=3D%%r
> > )
> > for /F "tokens=3D1-5 delims=3D.:" %%s in ("%TIME%") do (
> > set HH=3D%%s
> > set MI=3D%%t
> > set SS=3D%%u
> > )
> > set CURR_DATE=3D%YY%%MM%%DD%%HH%%MI%%SS%
> > set CURR_DATE=3D%CURR_DATE: =3D0%
> >
> --
> http://www.freelists.org/webpage/oracle-l

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Dec 06 2004 - 11:10:43 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US