Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

First date of month

980493Dec 23 2012 — edited Dec 24 2012
Hi experts,

Plz let me know how to get the 1st date of the month using query, after passing a date in the query:

My below queries are giving me 1st date of year and last date of the month....Kindly hep...
SELECT TRUNC(TO_DATE('24-JUN-2011'),'YEAR') FROM DUAL

SELECT LAST_DAY(ADD_MONTHS('24-JUN-2011',12 - 
TO_NUMBER(TO_CHAR(SYSDATE,'mm')))) FROM DUAL
Help appreciated,

Thnx in advance
This post has been answered by jeneesh on Dec 24 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 21 2013
Added on Dec 23 2012
8 comments
32,817 views