Question

  Asked: Apr 24 2008   11:45 AM GMT
  Asked by: Csshahie


Oracle Query: Return a date eg 29 February 2008


Oracle, Query

Hi

How can I return the last day of the second month of the current year in Oracle

Thanks in advance

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



to make the year current year, do:

last_day(to_date('02/01/' || to_char(sysdate,'yyyy'),'mm/dd/yyyy') )

or
select add_months(trunc(sysdate,'yyyy'),2) - 1 from dual;
  • AddThis Social Bookmark Button

Browse more Questions and Answers on Oracle and Development.

Looking for relevant Oracle Whitepapers? Visit the SearchOracle.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register