General OBIEE

Get Involved. Join the Conversation.

Topic

    Nirmal Kumar L
    Syntax to converting 24 hour time format to 12 hour format...
    Topic posted August 19, 2017 by Nirmal Kumar LBronze Medal: 1,250+ Points, tagged BI Publisher, BI Publisher Data Models, BI Publisher Report Templates, Data Models, OBI Answers, OBIEE Answers, Report Delivery, Report Layouts, Report Output, SQL 
    903 Views, 1 Comment
    Title:
    Syntax to converting 24 hour time format to 12 hour format in sql
    Summary:
    Syntax to converting 24 hour time format to 12 hour format in sql
    Content:

    Hi,

     

    Anyone know the SQL syntax to convert 24 hour time format(eg. 18:00 for 6:00 PM) to 12 hour format(eg. 6:00 PM)

    I tried the below query but it is not working. 

    SELECT 
           TO_CHAR(TIME_NORMAL_FINISH, 'hh:MI:SS:tt') "Date 12Hr"
      FROM per_all_assignments_m

     

    Thanks in advance,

    Nirmal kumar

    Comment

     

    • Manoj Gupta

      TO_CHAR(TIME_NORMAL_FINISH, 'HH:MI:SS AM')

      http://docs.oracle.com/database/121/NLSPG/ch4datetime.htm#NLSPG259