2 Replies Latest reply: May 20, 2011 7:04 AM by 861940 RSS

    Apex to Anychart date bug?

    user11981700
      Hi,
      It seems there's a bug in the way Apex sends the dates to Anychart. I'm trying to build a Resource chart where the duration is in minutes.
      I have identified an issue with the Minutes part of the dates. Anychart uses "mm" for minutes, but it seems Oracle is sending the month instead.

      I use the following query:

      Select null link,
      RELAUNCH_ID id,
      uproc_name name,
      null parent_id,
      to_date (to_char(running_evt_time,'DD-MON-YYYY HH24:MI:SS')
      ,'DD-MON-YYYY HH24:MI:SS') start_time,
      to_date (to_char(ending_evt_time,'DD-MON-YYYY HH24:MI:SS')
      ,'DD-MON-YYYY HH24:MI:SS') end_time
      from uni_evt_relaunches
      Where final_status = 'T'
      and ( management_unit_name like 'LIVE_%'
      or management_unit_name like 'PL_%'
      or management_unit_name like 'YCL_%'
      or management_unit_name in ('CHA','CHG','CHH', 'CHI', 'CHJ'
      , 'CHL','CHO','CHS','CHWAS','CHWEA')
      )
      and processing_date = '20110127'
      and substr (management_unit_name, instr(management_unit_name,'_')+1) = 'CHG'
      Order by running_evt_time

      Which return the following rows:

           22246     RTRM11__00     27-JAN-2011 09:30:01     27-JAN-2011 09:30:01
           22247     RTRM11CP01     27-JAN-2011 09:30:02     27-JAN-2011 09:30:02
           22248     RTRM11UZ02     27-JAN-2011 09:30:03     27-JAN-2011 09:30:03
           22251     RTRM11FT04     27-JAN-2011 09:30:04     27-JAN-2011 09:30:06
           22249     RTRM11FT03     27-JAN-2011 09:30:04     27-JAN-2011 09:30:05
           22500     CGBAT920          27-JAN-2011 09:30:06     27-JAN-2011 09:31:01
           22255     RTRM11__99     27-JAN-2011 09:31:02     27-JAN-2011 09:31:03
           22253     RTRM11DL06     27-JAN-2011 09:31:02     27-JAN-2011 09:31:02
           22489     RTRM10__00     27-JAN-2011 12:00:00     27-JAN-2011 12:00:00
           22491     CGBAT510          27-JAN-2011 13:23:21     27-JAN-2011 13:25:15
           22492     RTRM10__99     27-JAN-2011 13:25:15     27-JAN-2011 13:25:16
           22257     RTRM11__00     27-JAN-2011 14:30:00     27-JAN-2011 14:30:01
           22502     CGBAT920          27-JAN-2011 14:30:01     27-JAN-2011 14:30:58
           22259     RTRM11CP01     27-JAN-2011 14:30:01     27-JAN-2011 14:30:02
           22261     RTRM11UZ02     27-JAN-2011 14:30:02     27-JAN-2011 14:30:03
           22263     RTRM11FT03     27-JAN-2011 14:30:03     27-JAN-2011 14:30:11
           22265     RTRM11FT04     27-JAN-2011 14:30:03     27-JAN-2011 14:30:12
           22267     RTRM11DL06     27-JAN-2011 14:30:58     27-JAN-2011 14:30:58
           22269     RTRM11__99     27-JAN-2011 14:30:59     27-JAN-2011 14:30:59
           21964     RTRM_CHG          27-JAN-2011 14:40:43     27-JAN-2011 14:40:56
           22104     RTRM01__00     27-JAN-2011 14:40:50     27-JAN-2011 14:40:55
           22105     RTRM01CP01     27-JAN-2011 14:40:56     27-JAN-2011 14:40:56
           22107     RTRM01RN03     27-JAN-2011 14:40:57     27-JAN-2011 14:40:58
           22106     RTRM01UZ02     27-JAN-2011 14:40:57     27-JAN-2011 14:40:57
           22108     RTRM01MV04     27-JAN-2011 14:40:58     27-JAN-2011 14:41:03
           22109     RTRM01FT05     27-JAN-2011 14:41:03     27-JAN-2011 14:41:13
           22110     RTRM01FT06     27-JAN-2011 14:41:03     27-JAN-2011 14:41:23
           22111     RTRM01__98     27-JAN-2011 14:41:20     27-JAN-2011 14:41:21
           22113     RTRM01__99     27-JAN-2011 14:41:24     27-JAN-2011 14:41:24
           22112     RTRM01DL07     27-JAN-2011 14:41:24     27-JAN-2011 14:41:24
           22227     RTRM01CP00     27-JAN-2011 14:41:25     27-JAN-2011 14:41:25
           22033     RTRM01CP09     27-JAN-2011 14:41:25     27-JAN-2011 14:41:25
           22032     RTRM01CP08     27-JAN-2011 14:41:25     27-JAN-2011 14:41:25
           22034     RTRM01CP98     27-JAN-2011 14:41:26     27-JAN-2011 14:41:26
           22228     RTRM01CP96     27-JAN-2011 14:41:26     27-JAN-2011 14:41:27
           22354     RTRM03__00     27-JAN-2011 14:41:26     27-JAN-2011 14:41:27
           22355     CGBAT100          27-JAN-2011 14:41:27     27-JAN-2011 14:41:53
           22229     RTRM01CP97     27-JAN-2011 14:41:27     27-JAN-2011 14:41:34
           22356     PDBAT100          27-JAN-2011 14:41:27     27-JAN-2011 14:47:07
           22357     CGBAT800          27-JAN-2011 14:42:15     27-JAN-2011 14:42:19
           22358     CGBAT200          27-JAN-2011 14:47:08     27-JAN-2011 14:53:41
           22359     CGBAT300          27-JAN-2011 14:53:41     27-JAN-2011 14:57:25
           22362     CGBAT400          27-JAN-2011 14:57:26     27-JAN-2011 15:02:58
           22360     RTRM03FT07     27-JAN-2011 14:57:26     27-JAN-2011 14:57:26
           22361     RTRM03FT08     27-JAN-2011 14:57:26     27-JAN-2011 14:57:28
           22363     CGBAT500          27-JAN-2011 15:02:58     27-JAN-2011 15:04:41
           22364     RTRM03__99     27-JAN-2011 15:04:41     27-JAN-2011 15:04:42
           22441     RTRM05__00     27-JAN-2011 15:04:42     27-JAN-2011 15:04:43
           22442     RTRM05CP01     27-JAN-2011 15:04:43     27-JAN-2011 15:04:43
           22443     CLBAT100          27-JAN-2011 15:04:44     27-JAN-2011 15:09:20
           22445     RTRM05__99     27-JAN-2011 15:09:35     27-JAN-2011 15:09:36
           22477     RTRM06__00     27-JAN-2011 15:09:36     27-JAN-2011 15:09:38
           22478     CGBAT410          27-JAN-2011 15:09:38     27-JAN-2011 15:20:13
           22479     RTRM06__99     27-JAN-2011 15:20:14     27-JAN-2011 15:20:16
           21966     RTRM_END          27-JAN-2011 15:24:20     27-JAN-2011 15:24:21

      When I check the generated XML it clearly uses the MM(month) = January = 01 as the minutes part. I have tried it with data from february and ALL the minutes parts are = 02 :(

      <periods>
      <period resource_id="22246" start="2011.01.27 09.01.01" end="2011.01.27 09.01.01" style="defaultStyle" />
      <period resource_id="22247" start="2011.01.27 09.01.02" end="2011.01.27 09.01.02" style="defaultStyle" />
      <period resource_id="22248" start="2011.01.27 09.01.03" end="2011.01.27 09.01.03" style="defaultStyle" />
      <period resource_id="22251" start="2011.01.27 09.01.04" end="2011.01.27 09.01.06" style="defaultStyle" />
      <period resource_id="22249" start="2011.01.27 09.01.04" end="2011.01.27 09.01.05" style="defaultStyle" />
      <period resource_id="22500" start="2011.01.27 09.01.06" end="2011.01.27 09.01.01" style="defaultStyle" />
      <period resource_id="22255" start="2011.01.27 09.01.02" end="2011.01.27 09.01.03" style="defaultStyle" />
      <period resource_id="22253" start="2011.01.27 09.01.02" end="2011.01.27 09.01.02" style="defaultStyle" />
      <period resource_id="22489" start="2011.01.27 12.01.00" end="2011.01.27 12.01.00" style="defaultStyle" />
      <period resource_id="22491" start="2011.01.27 01.01.21" end="2011.01.27 01.01.15" style="defaultStyle" />
      <period resource_id="22492" start="2011.01.27 01.01.15" end="2011.01.27 01.01.16" style="defaultStyle" />
      <period resource_id="22257" start="2011.01.27 02.01.00" end="2011.01.27 02.01.01" style="defaultStyle" />
      <period resource_id="22502" start="2011.01.27 02.01.01" end="2011.01.27 02.01.58" style="defaultStyle" />
      <period resource_id="22259" start="2011.01.27 02.01.01" end="2011.01.27 02.01.02" style="defaultStyle" />
      <period resource_id="22261" start="2011.01.27 02.01.02" end="2011.01.27 02.01.03" style="defaultStyle" />
      <period resource_id="22263" start="2011.01.27 02.01.03" end="2011.01.27 02.01.11" style="defaultStyle" />
      <period resource_id="22265" start="2011.01.27 02.01.03" end="2011.01.27 02.01.12" style="defaultStyle" />
      <period resource_id="22267" start="2011.01.27 02.01.58" end="2011.01.27 02.01.58" style="defaultStyle" />
      <period resource_id="22269" start="2011.01.27 02.01.59" end="2011.01.27 02.01.59" style="defaultStyle" />
      <period resource_id="21964" start="2011.01.27 02.01.43" end="2011.01.27 02.01.56" style="defaultStyle" />
      <period resource_id="22104" start="2011.01.27 02.01.50" end="2011.01.27 02.01.55" style="defaultStyle" />
      <period resource_id="22105" start="2011.01.27 02.01.56" end="2011.01.27 02.01.56" style="defaultStyle" />
      <period resource_id="22107" start="2011.01.27 02.01.57" end="2011.01.27 02.01.58" style="defaultStyle" />
      <period resource_id="22106" start="2011.01.27 02.01.57" end="2011.01.27 02.01.57" style="defaultStyle" />
      <period resource_id="22108" start="2011.01.27 02.01.58" end="2011.01.27 02.01.03" style="defaultStyle" />
      <period resource_id="22109" start="2011.01.27 02.01.03" end="2011.01.27 02.01.13" style="defaultStyle" />
      <period resource_id="22110" start="2011.01.27 02.01.03" end="2011.01.27 02.01.23" style="defaultStyle" />
      <period resource_id="22111" start="2011.01.27 02.01.20" end="2011.01.27 02.01.21" style="defaultStyle" />
      <period resource_id="22113" start="2011.01.27 02.01.24" end="2011.01.27 02.01.24" style="defaultStyle" />
      <period resource_id="22112" start="2011.01.27 02.01.24" end="2011.01.27 02.01.24" style="defaultStyle" />
      <period resource_id="22227" start="2011.01.27 02.01.25" end="2011.01.27 02.01.25" style="defaultStyle" />
      <period resource_id="22033" start="2011.01.27 02.01.25" end="2011.01.27 02.01.25" style="defaultStyle" />
      <period resource_id="22032" start="2011.01.27 02.01.25" end="2011.01.27 02.01.25" style="defaultStyle" />
      <period resource_id="22034" start="2011.01.27 02.01.26" end="2011.01.27 02.01.26" style="defaultStyle" />
      <period resource_id="22228" start="2011.01.27 02.01.26" end="2011.01.27 02.01.27" style="defaultStyle" />
      <period resource_id="22354" start="2011.01.27 02.01.26" end="2011.01.27 02.01.27" style="defaultStyle" />
      <period resource_id="22355" start="2011.01.27 02.01.27" end="2011.01.27 02.01.53" style="defaultStyle" />
      <period resource_id="22229" start="2011.01.27 02.01.27" end="2011.01.27 02.01.34" style="defaultStyle" />
      <period resource_id="22356" start="2011.01.27 02.01.27" end="2011.01.27 02.01.07" style="defaultStyle" />
      <period resource_id="22357" start="2011.01.27 02.01.15" end="2011.01.27 02.01.19" style="defaultStyle" />
      <period resource_id="22358" start="2011.01.27 02.01.08" end="2011.01.27 02.01.41" style="defaultStyle" />
      <period resource_id="22359" start="2011.01.27 02.01.41" end="2011.01.27 02.01.25" style="defaultStyle" />
      <period resource_id="22362" start="2011.01.27 02.01.26" end="2011.01.27 03.01.58" style="defaultStyle" />
      <period resource_id="22360" start="2011.01.27 02.01.26" end="2011.01.27 02.01.26" style="defaultStyle" />
      <period resource_id="22361" start="2011.01.27 02.01.26" end="2011.01.27 02.01.28" style="defaultStyle" />
      <period resource_id="22363" start="2011.01.27 03.01.58" end="2011.01.27 03.01.41" style="defaultStyle" />
      <period resource_id="22364" start="2011.01.27 03.01.41" end="2011.01.27 03.01.42" style="defaultStyle" />
      <period resource_id="22441" start="2011.01.27 03.01.42" end="2011.01.27 03.01.43" style="defaultStyle" />
      <period resource_id="22442" start="2011.01.27 03.01.43" end="2011.01.27 03.01.43" style="defaultStyle" />
      <period resource_id="22443" start="2011.01.27 03.01.44" end="2011.01.27 03.01.20" style="defaultStyle" />
      <period resource_id="22445" start="2011.01.27 03.01.35" end="2011.01.27 03.01.36" style="defaultStyle" />
      <period resource_id="22477" start="2011.01.27 03.01.36" end="2011.01.27 03.01.38" style="defaultStyle" />
      <period resource_id="22478" start="2011.01.27 03.01.38" end="2011.01.27 03.01.13" style="defaultStyle" />
      <period resource_id="22479" start="2011.01.27 03.01.14" end="2011.01.27 03.01.16" style="defaultStyle" />
      <period resource_id="21966" start="2011.01.27 03.01.20" end="2011.01.27 03.01.21" style="defaultStyle" />

      </periods>


      Is this a know issue? Could you please point me to a solution?

      Thanks,
      Abie.
        • 1. Re: Apex to Anychart date bug?
          849869
          We are experiencing the exact same problem with the Project Gantt chart. The month is being displayed where the minutes are supposed to be displayed, and the hour is always displayed as "12", no matter what the actual underlying date value is.

          Is this an acknowledged bug? Is there a plan to fix it? This bug is rendering the Gantt charts useless to us, so it would be nice to have this fixed.

          We are running Application Express 4.0.2.00.07.

          Thanks,
          -Dave
          • 2. Re: Apex to Anychart date bug?
            861940
            It seems that i also hit this bug. I'm using APEX 4.0.2.00.07 - as far as i know the latest patch set.
            For the Oracle guys, here's a simple test case:

            I have created a chart region with a Gantt Resource chart.

            My "Application Date Format" is:
            DD.MM.YYYY HH24:MI:SS
            The Query for the first (and only) chart series:
            select null as link,
                   1 as id, 'Test' as name,
                   null as parent_id,
                   to_date('24.12.2011 13:55', 'DD.MM.YYYY HH24:MI') as start_date,
                   to_date('24.12.2011 16:00', 'DD.MM.YYYY HH24:MI') as end_date
            from dual
            The "Date Format" under "Gantt Settings" is empty.

            This results in a diagram with one bar starting and ending on 15.12.2011 - well, that's fine.
            But: The time component is completely messed up! The bar starts at 01:12 and ends at 04:12 in the morning (am)!!!

            So, there seem to be two bugs:
            First, from hours in the afternoon (13-24) are 12 hours substracted. (Hours from 0 to 12 seem to work...)
            Second, the minute information is replaced (!) with the month info.

            Is there a fix or a workaround?

            Thanks, Michael