Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2013
    Posts
    8

    Unanswered: Extract Quarter from date

    Hi ,

    Could you please help me to extract quarter from date. I have following date format

    5/31/2005 12:00:00.000000000 AM


    i need out that Q2 2005


    Thanks in Advance

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    use TO_CHAR & appropriate mask

    TO_CHAR (datetime)
    Format Models
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Jun 2013
    Posts
    8
    I User to_char function. But i am getting monthname year. i need to bring the chrecter in between

    to_char(ACTUALDATE__C,'Q YYYY')

    i need to bring 'Q' before to quarter number

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    'Q'||to_char(ACTUALDATE__C,'Q YYYY')
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

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