Reporting and Analytics for ERP

Get Involved. Join the Conversation.

Topic

    Karthik
    Convert SYSDATE to Mon-YY format in oracle
    Topic posted August 14, 2019 by Karthik, tagged BI Publisher, OBI Answers, OBIEE Answers, OTBI, Reports, Sample Reports 
    69 Views, 7 Comments
    Title:
    Convert SYSDATE to Mon-YY format in oracle
    Summary:
    Convert SYSDATE to Mon-YY format in oracle
    Content:

    Hi ,

     

    Can you please suggest how to convert SYSDATE to Mon-YY format. 

    Version:
    19B

    Comment

     

    • Santosh Kumar Bhairi

      select to_char(sysdate, 'mon-yy') from dual

      • Karthik

        but it is displaying output as 08-19

        my requirement is Aug-19

        • Santosh Kumar Bhairi

          if you are using to_char with 'Mon-YY', the output has to be like this:

          Aug-19.

          If possible, share the screenshot. 

          I have tried this in my non-fusion database but that does not matter as you are executing it thru BIP data-model:

          select to_char (sysdate, 'Mon-YY') from dual

    • Sudhakara Rao Kovuru

      Its strange.... I ran the query but it showing as 08-19 ?

    • Viswanadha Reddy

      Hi,

      try with below statement..

      select (TO_CHAR(sysdate,'MON-YY','NLS_DATE_LANGUAGE=AMERICAN')) dt from dual

       

      Thanks

      Viswa

    • Amar

      SELECT Decode(To_char(sysdate, 'Month'), 1, 'Jan',
                                               2, 'Feb',
                                               3, 'Mar',
                                               4, 'Apr',
                                               5, 'May',
                                               6, 'Jun',
                                               7, 'Jul',
                                               8, 'Aug',
                                               9, 'Sep',
                                               10, 'Oct',
                                               11, 'Nov',
                                               'Dec')
             || '-'
             || To_char(sysdate, 'YY') period
      FROM   dual