Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Given quarter, how to get date using to_date?

Re: Given quarter, how to get date using to_date?

From: fumi <fumi_at_tpts5.seed.net.tw>
Date: 11 Oct 1999 17:18:17 GMT
Message-ID: <7tt64p$ie4$1@news.seed.net.tw>

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_



01-OCT-99
1 row selected. Received on Mon Oct 11 1999 - 12:18:17 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US