Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2006
    Posts
    83

    Unanswered: Function to get the QUARTER of a year

    Hiiiiii,

    Please advice me how to get the quarter of a year for a particular date.i.e the function that
    Returns the quarter of the year for date, in the range 1 to 4.

    In db2 we can use QUARTER function for this.
    I need it in Oracle.
    Than q

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Use TO_CHAR function with 'Q' format mask:
    Code:
    SELECT TO_CHAR(TO_DATE('20.11.2007', 'dd.mm.yyyy'), 'Q') quarter
    FROM dual;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •