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: Problem with a date in the query !!

Re: Problem with a date in the query !!

From: Chris L. <diversos_at_uol.com.ar>
Date: 26 Dec 2005 08:51:28 -0800
Message-ID: <1135615888.310253.108430@z14g2000cwz.googlegroups.com>


First you need April first of current year:

select to_date(to_char(sysdate,'yyyy')||'0401','yyyymmdd') from dual;

Then you need March 31 of next year: (notice the adding of 1 to the year)

select to_date(1+to_char(sysdate,'yyyy')||'0331','yyyymmdd') from dual;

And remember: the correct way to use between is "between <value1> and <value2>" (you used "between.. to...")

Regards Received on Mon Dec 26 2005 - 10:51:28 CST

Original text of this message

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