Im running this query:
select round(add_months(sysdate,500),'YYYY')
from dual;
This retuns:
01-JAN-2044.
I want it to return:
01-JAN-2040.
Thanks
- Daniel Wisser <daniel.wisser_at_isis-papyrus.com>
wrote:
> hi imran!
>
> don't exactly understand what you want to do, but
> rounding
> e.g. the year works like that
>
> select round(to_char(sysdate, 'YYYY'),-2) from dual;
>
> i dont understand what you wanna do with days and
> months,
> but if its always 01-01 then
>
> select '01-01-'||round(to_char(sysdate, 'YYYY'),-2)
> from dual;
>
> will do.
>
>
> regards
> daniel
>
>
> Imran Ashraf wrote:
> >
> > Hi,
> >
> > how do i round dates like this:
> > Date = 01-01-1996
> > Return = 01-01-2000
> >
> > or
> >
> > Date = 01-01-1992
> > Return = 01-01-1990
> >
> > Thanks.
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Faith Hill - Exclusive Performances, Videos & More
> > http://faith.yahoo.com
> > --
> > Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> > --
> > Author: Imran Ashraf
> > INET: imran9a_at_yahoo.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).
>
> --
> Daniel Wisser, Mag.
> Papyrus Quality Assurance
> DB Team
>
> ISIS Information Systems
> Alter Wienerweg 12
> A-2344 Ma. Enzersdorf, Austria
>
> Phone: +43-2236-27551-149
> Fax: +43-2236-21081
> E-mail: daniel.wisser_at_isis-papyrus.com
>
> Hotline: +43-2236-27551-111
>
> Visit the ISIS Website: http://www.isis-papyrus.com
>
>
> This e-mail is only intended for the recipient and
> not legally
> binding. Unauthorised use, publication, reproduction
> or
> disclosure of the content of this e-mail is not
> permitted.
>
> --
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> --
> Author: Daniel Wisser
> INET: daniel.wisser_at_isis-papyrus.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).
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Imran Ashraf
INET: imran9a_at_yahoo.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 Fri Oct 18 2002 - 06:53:27 CDT