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

Home -> Community -> Usenet -> c.d.o.misc -> Re: oracle question to get Date minus 1

Re: oracle question to get Date minus 1

From: Volker Hetzer <firstname.lastname_at_ieee.org>
Date: Fri, 29 Sep 2006 16:34:29 +0200
Message-ID: <efjatm$53e$1@nntp.fujitsu-siemens.com>


pawan_test schrieb:
> hello Brian,
>
> thanks for your suggestions.
> this is what i tried.
>
> SQL> select to_date('20060928', 'YYYYMMDD') - 1 from dual;
>
>
> TO_DATE('
> ---------
> 27-SEP-06
>
>
> my desired output in this case is 20060927 but here the output is
> coming as 27-SEP-06.

SQL> select to_char(to_date('20060928', 'YYYYMMDD')-1,'YYYYMMDD') from dual;

Volker

-- 
For email replies, please substitute the obvious.
Received on Fri Sep 29 2006 - 09:34:29 CDT

Original text of this message

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