Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Need a function
Hi!
Try something like this:
IF TO_DATE(last_date,'DD-MON-YYYY')=TRUNC(LAST_DAY(last_date)) THEN
RETURN ...
Hope this helps.
Thanks
-Kumar
In article <363d63d5.6763515_at_news.twsc.pouchen.com.tw>,
violin.hsiao_at_mail.pouchen.com.tw (Violin) wrote:
> Hello,
> I have to create a procedure:
> CREATE PROCEDURE TEST (start_date IN VARCHAR2,
> end_date IN
VARCHAR2)
> If the start_date is the first day of the month and
> the end_date is the last day of the month
> ex.start_date='19981001' and end_date='19981031'
> Then return the first day of last month and
> the end day of last month.
> return '19980901' and '19980930'.
>
> I want to know is there any function to verify
> if the end_date is the last day of the month.
> or how to create a function for the purpose.
>
> Thank you for your help.
> Please Cc to: violin.hsiao_at_mail.popuchen.com.tw,Thanks.
>
> Violin.
>
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Fri Oct 30 1998 - 15:23:38 CST