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: Out of topic -Unx question

RE: Out of topic -Unx question

From: Richard Ji <richard.ji_at_mobilespring.com>
Date: Sun, 22 Dec 2002 22:03:37 -0800
Message-ID: <F001.0052100A.20021222220337@fatcity.com>


Search the archive of this list. This has been discussed before.

You can use a trick such as this:

yesterday=$(TZ=EST26EDT date +%a)

but beaware that this is not a portable solution. You can write your own script. E-mail me off line and I can send you mine yesterday script.

-----Original Message-----
Sent: Monday, December 23, 2002 12:09 AM To: Multiple recipients of list ORACLE-L

Not easily done in Unix. However, if you've got an Oracle db running on the same server you might want to get yesterday's date from Oracle (within a shell script).

...
...
YESTERDAY=`sqlplus -s / <<-EOF

           set head off feed off pages 0
           select trunc(sysdate - 1) from dual;
           exit
           EOF`

echo "YESTERDAY is $YESTERDAY"
...
...

hth,
Ross

-----Original Message-----
Sent: Saturday, 21 December 2002 7:51
To: Multiple recipients of list ORACLE-L

Hi All,

          I want to get previous date from today's date.Is there any cmd for

this.

Thanks
Manoj

--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author:
  INET: manoj.gurnani_at_orbitech.co.in

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Ross Collado
  INET: Ross.Collado_at_techpac.com
Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Richard Ji
  INET: richard.ji_at_mobilespring.com
Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Mon Dec 23 2002 - 00:03:37 CST

Original text of this message

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