Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: date minus one
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
-----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
![]() |
![]() |