Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Given quarter, how to get date using to_date?
Wilson NG <wilsonn_at_iname.com> wrote in message
news:37FDFD72.D3A86EF4_at_iname.com...
> Oracle sql: Possible to get the date that is the first day of the
> quarter(so what is 'format')?,
> e.g., to_date('4 1999', 'format') return date: 01-OCT-99
The 'Q' mask can not be used in to_date() function, you must transfer it to month:
SQLWKS> select to_date('1999-'||to_char((4-1)*3+1), 'yyyy-mm') from dual; TO_DATE('1999-'||TO_
![]() |
![]() |