4 Replies Latest reply: Jan 22, 2013 2:54 AM by Nick B RSS

    Apex date formate issue

    Anbarasan-Oracle
      Hi All,
      i have start date column in table t_date..have date like this -01-JAN-14,but in Apex intactive report displaying with
      "01-JAN-0014"
      -----------------------
      i need '01-JAN-2014' formate as a date..Please help..
        • 1. Re: Apex date formate issue
          Zulqarnain
          Hi

          This means the data in your table is actually "01-JAN-0014". You can verify this with following query:
          select to_char(start_date, 'DD-MON-YYYY') from t_date;
          You have to correct the data in your table first.

          ---
          Zulqarnain
          MaxApex Hosting
          http://www.maxapex.com
          • 2. Re: Apex date formate issue
            Anbarasan-Oracle
            YES,i have chekced select to_char(start_date, 'DD-MON-YYYY') from t_date;
            have date like 01-JAN-0014.
            but in data base.if selecting -SELECT STARTDATE FROM t_date; Giving out put like '01-JAN-14'

            Please help.
            • 3. Re: Apex date formate issue
              714270
              anbarasan wrote:
              Hi All,
              i have start date column in table t_date..have date like this -01-JAN-14,but in Apex intactive report displaying with
              "01-JAN-0014"
              -----------------------
              i need '01-JAN-2014' formate as a date..Please help..
              What is the "Application Date Format" setting for your application? You can find this setting under the "Edit Globalization Attributes" page.
              Also, this thread might help to understand about the date formatting (though, its a quite old thread):
              HTMLDB - HOWTO Work with Dates


              Thanks,
              Rohit
              • 4. Re: Apex date formate issue
                Nick B
                This isn't much of a date format issue. Your data in the date column is simply wrong I guess. Don't expect to get back 01-JAN-2014 if your date column value is 01-JAN-0014. The reason you see 01-JAN-14 in the "database" is caused by your client's NLS settings. Execute the below code before you run your query and you'll get to see the same result as in the interactive report.

                alter session set nls_date_format = 'DD-MON-YYYY';

                Fix the data issue and your problem is solved.