Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: 1st Day of the Month
Michel Cadot wrote:
> "Gints Plivna" <gints.plivna_at_gmail.com> a écrit dans le message de news: 1168285618.482307.18120_at_v33g2000cwv.googlegroups.com...
> | rios wrote:
> | > Is there a native function to tell is a date is FIRST day, Last DAY of the
> | > month ?
> | >
> | > other than this way:
> | > to_number(to_char(sysdate,'dd'))
> | >
> | > thanks
> | >
> | > --
> | > 10gR2
> |
> | There is a function called last_day. Speaking of first day of month,
> | untill now I was under the impression that all months start with 1. Am
> | I missing something? :)
> |
> | Gints Plivna
> | http://www.gplivna.eu
> |
>
> Wrong! It is the day after the last day of the previous month. :)
>
> Regards
> Michel Cadot
The first day of the month can be found via select trunc(sysdate,'MM') from sys.dual
HTH -- Mark D Powell -- Received on Mon Jan 08 2007 - 16:41:46 CST