First Day of next month [message #35581] |
Thu, 17 February 2005 07:03  |
sheela
Messages: 66 Registered: March 2002
|
Member |
|
|
Hello everyone,
Can anyone tell me how to get first day of next month? I will be passing in Month and year as a parameter.
For example
Instead of passing the complete sysdate, I will be passing in 02/2005 and I need to get 03/01/2005 from the resultant query..
thanks in advance
Sheela
|
|
|
Re: First Day of next month [message #35582 is a reply to message #35581] |
Thu, 17 February 2005 07:47   |
Jayan
Messages: 27 Registered: February 2005
|
Junior Member |
|
|
Hi,
this satisfies yr. requirement
****************************************************
Can anyone tell me how to get first day of next month? I will be passing in Month and year as a parameter.
For example
Instead of passing the complete sysdate, I will be passing in 02/2005 and I need to get 03/01/2005 from the resultant query..
****************************************************
Select to_char(ADD_MONTHS(Trunc(TO_DATE('02/2005','MM/YYYY'),'MONTH'),1),'mm/dd/yyyy') "First_DayOf_Next_Month"
FROM DUAL;
|
|
|
|
|
|
|
|
|