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

Home -> Community -> Usenet -> c.d.o.server -> Re: Can i get a quarter from the date data type

Re: Can i get a quarter from the date data type

From: John Chiu <johnymc_at_netscape.net>
Date: Mon, 13 Dec 1999 05:27:25 -0500
Message-ID: <832hga$cfm$1@news2.tor.accglobal.net>


Set the date format as 'Q' or 'q':

O8IB > select to_char(to_date('01/15/1999','mm/dd/yyyy'),'Q') from dual;

T
-

1

O8IB > select to_char(to_date('07/15/1999','mm/dd/yyyy'),'q') from dual;

T
-

3

HTH John Chiu

Parvinder Singh <parora_at_questone.com> wrote in message news:3854C184.1BBDBF29_at_questone.com...
Hi all

    I have got a small doubt ...can i get the quarter value with respect to a month from the field which is of the data type DATE for e.g
month table (01-Jan-99,01-Apr-99)
now the quarter values with respec to jan and apr are q1.1999 and q2.1999 can we have that from the field itself ...in other words do we have any date format which will give us the corresponding quarters of the date Thanks & Regards
~Parvinder

P.S : Also reply to parora_at_questone.com Received on Mon Dec 13 1999 - 04:27:25 CST

Original text of this message

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