2 Replies Latest reply: Dec 3, 2012 8:44 AM by Hyder Mehtawala RSS

    Formating seconds value to hh:mi:ss


      I need to format a integer value which represents seconds into hh:mi:ss in OBIEE 11g, however when i use the custom formatting [FMT:time] it displays AM at the end which i don't want.

      What is the best way to format into hh:mi:ss and is it possible to remove this AM?
        • 2. Re: Formating seconds value to hh:mi:ss
          Hyder Mehtawala

          If you need to convert an Integer (which represents seconds) into custom time format (H:mm:ss), you can try the below approach.

          - convert the integer column into a date format column and then apply custom data format i.e. H:mm:ss.
          - To convert integer column into a date format column, you can change your integer column fx to something like:
          TimestampAdd(SQL_TSI_SECOND,YourTableName.ColumnName,TIMESTAMP'2012-01-01 00:00:00')
          - Here, YourTableName.ColumnName is the column name of your integer column.
          - Now, go to Column Properties -> Data Format and change it to Custom and provide the format as H:mm:ss. This will give you the seconds in 24Hrs format.
          - For e.g. An integer value of 1524 will now be shown as 00:25:24.