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: date minus one

RE: date minus one

From: Reidy, Ron <Ron.Reidy_at_arraybiopharma.com>
Date: Tue, 29 Mar 2005 12:29:38 -0700
Message-ID: <17CAB0BF27BCFC47B0E4554A0E2F962B562A86@fiji.arraybp.com>


perl -MDate::Calc -e '@yesterday =3D Date::Calc::Add_Delta_Days(1, 1, 1, = (Date::Calc::Date_to_Days(Date::Calc::Today()) - 1) -1); print = @yesterday, "\n";'

prints:=20

20050328



Ron Reidy
Lead DBA
Array BioPharma, Inc.

-----Original Message-----

From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Knight, Jon Sent: Tuesday, March 29, 2005 11:55 AM
To: oracle-l
Subject: date minus one

  Just curious how the rest of the world gets "yesterday" in UNIX. = We're
running Solaris and we execute a sqlplus script with "select sysdate-1 = from
dual;" and pipe it to tail to set an environment variable.

  Is there a more UNIXy way, -or- maybe a java function. Any = suggestions
welcome.

TIA,
Jon Knight

--

http://www.freelists.org/webpage/oracle-l

This electronic message transmission is a PRIVATE communication which = contains
information which may be confidential or privileged. The information is = intended=20
to be for the use of the individual or entity named above. If you are = not the=20
intended recipient, please be aware that any disclosure, copying, = distribution=20
or use of the contents of this information is prohibited. Please notify = the
sender of the delivery error by replying to this message, or notify us = by
telephone (877-633-2436, ext. 0), and then delete it from your system.

--

http://www.freelists.org/webpage/oracle-l Received on Tue Mar 29 2005 - 14:31:49 CST

Original text of this message

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