1 Reply Latest reply: Jan 22, 2014 2:49 AM by fac586 RSS

    Date format in apex items

    RWErene81

      Hi,

       

      i have a Problem with the formating of a table colum.

       

        , NVL2(p.buchungsdatum,
            APEX_ITEM.DISPLAY_AND_SAVE(8,TO_CHAR(p.abschlussdatum,'DD.MM.YYYY')),
            APEX_ITEM.DATE_POPUP(8,rownum,p.abschlussdatum,'DD.MM.YYYY',15,30)) abschlussdatum
      

       

       

      If i click on the header in the table, becaus i want to sort the entries asc or desc, the sorting is alpha numeric not numeric. I need the sorting function in  APEX_ITEM.DISPLAY_AND_SAVE AND in APEX_ITEM.DATE_POPUP

       

      What can i do specially hier

      APEX_ITEM.DATE_POPUP(8,rownum,p.abschlussdatum,'DD.MM.YYYY',15,30)) abschlussdatum
      

       

      THX

      René

        • 1. Re: Date format in apex items
          fac586

          user10457644 wrote:

          Please update your forum profile with a real handle instead of "user10457644"

           

          Include two columns in the report query, one containing the original value, and one to generate the formatted control:

           

            , p.abschlussdatum
            , NVL2(p.buchungsdatum,
                APEX_ITEM.DISPLAY_AND_SAVE(8,TO_CHAR(p.abschlussdatum,'DD.MM.YYYY')), 
                APEX_ITEM.DATE_POPUP(8,rownum,p.abschlussdatum,'DD.MM.YYYY',15,30)) abschlussdatum_ctrl
          
          
          

           

          Hide the ABSCHLUSSDATUM_CTRL column, and set the HTML Expression attribute for the ABSCHLUSSDATUM column to #ABSCHLUSSDATUM_CTRL#. Ensure the Display Text As column attribute is Standard Report Column rather than the default Display as Text (escape special characters), and the Strip HTML report attribute is set to No.

           

          The ABSCHLUSSDATUM column will then display the ABSCHLUSSDATUM_CTRL form control, but be sorted using the original ABSCHLUSSDATUM date value.