DECODE date bug

Could someone else confirm this?
We are using 9i R1.
DECODE(<date field>, 'DD-MON-YYYY', , ) fails.
ie.
     select decode (trunc(sysdate),'09-JUN-2003','Y','N') from dual ---> Returns 'N'
But     select decode (trunc(sysdate),'09-JUN-03','Y','N') from dual ---> Returns 'Y'
Thanks,
Allan S.

Can you give us an example of your tests, on my db it works in the where clause exactly the same as in the decode (and as expected).
select EMPNO, HIREDATE from EMP
where trunc(hiredate)='&1'
Enter value for 1: 22.02.1981
       EMPNO HIREDATE
        7521 22.02.1981
select EMPNO, HIREDATE from EMP
where trunc(hiredate)='&1'
Enter value for 1: 22.01.81
no rows selected
[pre]

Similar Messages

  • The DATA BUG of OVI 3.03 on E72, disgusting!

    Nearly at the same time at the afternoon today - 25 Jan. Many of the users of E72 found their New OVI Maps occured a serious problem. When they open the icon "My place" in GPS, the program halt and no response at all. Many of them think maybe it just be a problem of their own E72 or due to some collisions of the software they installed and even formate the phone or reinstall the OVI maps many times. But as I confrim on some forums,I make sure that this is a BUG of the software.
    First of all, I should declare the OVI maps and software I installed on my E72 were all download form official website maps.nokia.com and with newest verison.
    The Symptom is:
    1. when you open OVI maps and click the "my place"  icon the program halt unless you shutdown the program in task manager or restart the phone.  But if you click the "search" first only once, then all the functions will be ok.
    2. If you change the date to 24 Jan or 26 Jan, every thing is OK. And if you change the date to 15, 25 of anyother months if only the date contain "5", the problem will happen again.
    From this symptom, I can sure it is a DATE BUG of new OVI maps. I just CAN NOT believe NOKIA could made this stupid mistake. I hope NOKIA could fix it or update the software ASAP.
    Message Edited by joeye on 25-Jan-2010 11:00 PM

    Hi,
    We think we know the cause of this issue to be the welcome note localised to Latvian.
    From what we can tell from your firmware version, you are running a latvian varient. We are aware (and have fixed for the next release) that the welcome note, translated to latvian, was causing the application to crash.
    To work around this until the release is made available, please do the following:
    Change the device language, for example to English, and restart the Maps application. Once the application is started, you should then be able to exit the application, revert the language back to Latvian, and restart the Maps application without it Crashing.
    Please let me know if this resolves your issue.
    KR
    Chris
    Although i work for Nokia, my opinions are my own!
    Got a Maps query? Check our Maps FAQ's

  • Decode date help

    hi all,
    Trying to run a simple decode date check:
    select T1.priority
    , DECODE(T1.submitdate, (greatest(T1.submitdate, '30/06/2007')),'1') as MyCount
    from table1 T1
    my goal is to cross tab this so result will look like:
    PRIORITY TOTAL NEW AS OF 30/06/2007
    HIGH 5 1
    MEDIUM 1 0
    is my decode working correctly with the date range?
    So I want to see for HIGH, are there "NEW" ones since 30/06/2007?
    thanks!

    select T1.priority, count(*) as "Total"
    , CASE WHEN T1.submitdate >= to_date('30/06/2007','DD/MM/YYYY') THEN '1' ELSE '0' END as New
    from table T1
    hmmm, this works now but the results are not summed up??
    PRIORITY TOTAL NEW
    HIGH 1 1
    HIGH 1 0
    HIGH 1 0 .......
    how do I get this?
    PRIORITY TOTAL NEW
    HIGH 3 1

  • Nokia X6 *NEW* date bug.

    This is a new possible bug which I've just spotted on my Nokia X6 16GB, which is slightly worse than the date incorrect bug described here: /t5/Xseries/X6-Date-incorrect/td-p/684385
    Instead of the date on the phone reverting back by 24 hours, when I switched on my X6 just now, the date reverted all the way back to 01/01/2010 
    This is the 1st time I've seen a X6 have its system date automatically shoot all the way back to 1st Jan 2010.
    Bug detected on firmware version 31.0.004
    If you have encountered this problem, please post it here.

    This is also associated with the other date bug, I have seen this as well as losing a day.

  • Decoded datas to Base 64

    i try to convert to decode data to base 64 using bouncy castle lib.
    after decoding i got Bizarre characters
    my input data :IzIrnQA2aQbOw5ysPJJumDSspCvdwd/zec21/K+t1RlXsjid6vpNsNKVgCH5KfMIeqXFsGEKRZO/4Xd2nZYND32eSdbbqgkDFMsYK8qSFQo2gvYwHXAQg5BEvB51zldef4mr06GXldtTIZSKfGMI1WcoM92Zi9P1sfZd2hfy7zc=
    out data :
    #2+?&#65533;6i????<?n?4??+????y??????W?8???M????!?)?z???a
    E???wv??
    }?I???     ?+??
    6??0p??D?u?W^???????S!??|c?g(3???????]???7
    is it correct? thank you for any response

    bada wrote:
    Hear is the line of my code.
    import org.bouncycastle.util.encoders.Base64
    String decodedStr ="IzIrnQA2aQbOw5ysPJJumDSspCvdwd/zec21/K+t1RlXsjid6vpNsNKVgCH5KfMIeqXFsGEKRZO/4Xd2nZYND32eSdbbqgkDFMsYK8qSFQo2gvYwHXAQg5BEvB51zldef4mr06GXldtTIZSKfGMI1WcoM92Zi9P1sfZd2hfy7zc=";
    byte[] signBytes = Base64.decode(decodedStr.getBytes("UTF-8"))
    System.out.println(new String(signBytes ));
    Do you see something wrong in the code.Yes. Don't convert the signBytes to a String since (reading between the lines) it is a signature which is binary data and not characters.

  • TIPS(53) : DECODE를 이용한 DATE INSERT 시에 잘못된 값이 들어가는 경우.

    제품 : ORACLE SERVER
    작성날짜 : 2002-11-06
    TIPS(53) : DECODE를 이용한 DATE INSERT 시에 잘못된 값이 들어가는 경우
    =====================================================================
    Purpose
    decode를 사용하는 date data type의 처리에서는 가끔 예기치 않은
    오류가 발생된다. 예를 들면 2000년을 insert를 하였는데 실제 값은
    1900년이 들어가게 되는 문제이다. 이것은 사용자를 매우 당황하게
    만드는데 이런 경우에 대해 확인하고 조치하는 방법을 살펴보자.
    Problem Description
    1. nls_date_format을 'yy-mon-dd'로 하였을 경우
    SQL> ALTER SESSION SET NLS_DATE_FORMAT='YY-MON-DD';
    SQL> CREATE TABLE TABDATE(COLDATE DATE);
    SQL> INSERT INTO TABDATE(COLDATE)
    SELECT DECODE('1','0',NULL,'1',(TO_DATE('200511','RRRRMM')))
    FROM DUAL;
    SQL> SELECT TO_CHAR(COLDATE,'YYYY-MM-DD') FROM TABDATE;
    TO_CHAR(CO
    1905-11-01 -- 2005년이 들어가 있어야 하는데 오동작을 했다.
    2. nls_date_format을 'yyyy-mon-dd'로 하였을 경우
    SQL> ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MON-DD';
    SQL> INSERT INTO TABDATE(COLDATE)
    SELECT DECODE('1','0',NULL,'1',(TO_DATE('200511','RRRRMM')))
    FROM DUAL;
    SQL> SELECT TO_CHAR(COLDATE,'YYYY-MM-DD') FROM TABDATE;
    TO_CHAR(CO
    1905-11-01
    2005-11-01 -- 정상적인 값이 들어와 있다.
    3. 문제 설명
    어떻게 이런 문제가 발생하는가?
    이것은 dbms가 decode를 처리하는 내부적인 절차에 의해 벌어지는 것으로
    당연한 현상이다. decode를 처리할 경우 decode 안의 값이 to_date로
    처리되기 이전에 varchar2로 값을 넘겨 받아서 그 결과값으로 to_date
    함수에 넘겨저서 처리하게 된다.
    그런데 이 경우에 to_date 함수를 처리하기 전에 data의 conversion에
    이용되는 것이 시스템의 default NLS_DATE_FORMAT 값인 것이다.
    그러므로, 이 값의 년도 처리가 두 자리로 되어 있을 경우 년도를 두자리
    만을 처리하여 varchar2 값으로 넘기게 되고 이것을 to_date 함수를
    이용하여 처리하게 되므로 우리가 예상치 못한 값이 나오게 되는 것이다.
    실제 SQL이 다음과 같으면
    SELECT to_char(to_date('0511','yyMM'),'yyyymmdd') FROM DUAL;
    결과 값은 19051101로나오게 된다.
    Solution Description
    이 문제는 NLS_DATE_FORMAT의 년도가 두 자리로 지정된 경우에
    decode 함수를 사용하는 date data는 오동작을 할 가능성이 있다는 것이다.
    이에 대한 해결 방법은 nls_date_format의 년도를 네 자리로 지정해 주는 것이다.
    이에는 세 가지 방법이 있을 것이다.
    1. alter session set nls_date_format='yyyy-mm-dd';
    2. 환경변수의 nls_date_format을 변경하기.
    3. database 내의 nls_date_format를 변경하기.
    Reference Documents
    none

  • ICS Calendar Widget Date Bug

    I'm running the .587 software release.
    Today is 10th September. I added a new calendar event for 25th September to my Google calendar (all OK). I have the calendar widget on my homescreen and it shows "No upcoming calendar events" (as it should as there are no events in the immediate future). If I tap on "No upcoming calendar events" it will show me my next event (the one on 25th September) -- all good so far.
    However, when I look at the details shown for this event it shows both the "From" and "To" times as "01:00, Thu, 1 Jan 1970"!!! (if I go through the Calendar app and not the widget the dates display properly as 25th September). This is extremely annoying, and it can also corrupt your calendar dates by replacing them with this 1970 date if you then go on to tap the "edit event" button.
    Please fix this bug!!!!

    Have you also tried with other calendar widgets to see if the same problem occurs? It's wise to try so your able to sort out what might be causing the issue.
    Try it out and let me know!
    What do you think about this forum? Let us know by doing this short survey.

  • Looking for some tips on Decoding date. TX

    HI,I still have problem with this decode. I need to count students group by their region on each month. The output should be
    COUNTRY OCT NOV DEC .....
    USA 5 20 30
    CAN 100 1 0
    MEX 10 20 30
    The date format is 5/19/2007
    This is my code: and thanks for your help
    WITH Q AS (SELECT DISTINCT A.STDID, A.NUMBER, A.ADMIT
    FROM PROG A
    JOIN CITIZEN B ON A.STDID = B.STDID
    JOIN REGION_TBL C ON C.REGION = B.REGION
    AND A.NUMBER = 'PS'
    AND A.ADMIT IN ('2007','2008'))
    SELECT J.REGION, I.DESCR,
    SUM(DECODE(TO_CHAR(L.ACTION_DT,'YYYY-MM-DD', '09', 1, 0))) SEP_TOTAL,
    SUM(DECODE(TO_CHAR(L.ACTION_DT,'YYYY-MM-DD', '10', 1, 0)))OCT_TOTAL,
    SUM(DECODE(TO_CHAR(L.ACTION_DT,'YYYY-MM-DD', '11', 1, 0)))NOV_TOTAL,
    SUM(DECODE(TO_CHAR(L.ACTION_DT,'YYYY-MM-DD', '12', 1, 0)) )DEC_TOTAL,
    SUM(DECODE(TO_CHAR(L.ACTION_DT,'YYYY-MM-DD', '1', 1, 0)) )JAN_TOTAL,
    SUM(DECODE(TO_CHAR(L.ACTION_DT,'YYYY-MM-DD', '2', 1, 0)) )FEB_TOTAL,
    SUM(DECODE(TO_CHAR(L.ACTION_DT,'YYYY-MM-DD', '3', 1, 0)) )MAR_TOTAL,
    SUM(DECODE(TO_CHAR(L.ACTION_DT,'YYYY-MM-DD', '4', 1, 0)) )ARL_TOTAL,
    SUM(DECODE(TO_CHAR(L.ACTION_DT,'YYYY-MM-DD', '5', 1, 0)) )MAY_TOTAL,
    SUM(DECODE(TO_CHAR(L.ACTION_DT,'YYYY-MM-DD', '6', 1, 0)) )JUN_TOTAL,
    SUM(DECODE(TO_CHAR(L.ACTION_DT,'YYYY-MM-DD', '7', 1, 0)) )JUL_TOTAL,
    SUM(DECODE(TO_CHAR(L.ACTION_DT,'YYYY-MM-DD', '8', 1, 0)) )AUG_TOTAL
    FROM CITIZEN J
    JOIN PROG L ON J.STDID = L.STDID
    JOIN Q ON J.STDID = Q.STDID
    AND Q.NUMBER = J.NUMBER
    GROUP BY J.REGION, I.DESCR

    SUM(DECODE(TO_CHAR(L.ACTION_DT,'YYYY-MM-DD', '09', 1, 0))) SEP_TOTAL,Apart from having brackets in the wrong place you are comparing a date that you are converting to a string in the format YYYY-MM-DD to a string that is 1 or 2 digit number.
    This should be something like
    SUM(DECODE(TO_CHAR(L.ACTION_DT,'MM'),'09',1,0)) as SEP_TOTAL,

  • Date Bug in Report Builder

    Hi guys,
    Problem / Bug
    i have a very simple layout report on scott.emp table. i passes two parameters throught parameter form.
    i have assigned the data type as well as the initial value.
    Report paremeter form takes and on message shows a date which has not been mentioned / assigned any where. like (01/02/3021).
    after parameter form having few conditions like if dates are blank then parameter P1 Gets first condition else it gets the second one.
    but report builder runs the first condition each time what ever you do with it.
    mean this is joke with a developer.
    i have re-installed the developer6 no of times and also used tips from fellows to get the right results.
    anyway i will appreciate if some body could resolve this problem.
    Regards,
    Kamal

    Just a couple of things you could look at:
    1) Is P1 null. In PL/SQL, equality comparisons against any null value will always return FALSE. You need to directly compare against null - "if (:p1 is not null)/if (:p1 is null)"
    2) P1's format mask. If the input format mask is something like: 'YYYY' then the date will show up as '01-JUL-YYYY' regardless of the date you gave it (or subsequently set it to in the PL/SQL).

  • Excel VBA date bug

    This error was found in Excel 2010 32 bit but may be present in other versions. The error happens when writing specific dates to an Excel cell. The VBA code
    Dim datDate as Date
    datDate = CVDate(41586.9999999995)
    ActiveWorkbook.Sheets("Sheet1").Cells(3, 2).Value=datDate
    ActiveWorkbook.Sheets("Sheet1").Cells(3, 2).Value=CDbl(41586.9999999995)
    Will result in the following output to the Excel sheet
    11/8/2013 0:00
    11/9/2013 0:00
    Both dates should be 11/9/2013. The error happens when writing a date to an Excel cell when the is almost (less than a second) before midnight. The conversion of the variable from date to double precision type fixes the bug.

    Allan wrote:
    Dim datDate as Date
    datDate = CVDate(41586.9999999995)
    ActiveWorkbook.Sheets("Sheet1").Cells(3, 2).Value=datDate
    ActiveWorkbook.Sheets("Sheet1").Cells(3, 2).Value=CDbl(41586.9999999995)
    Will result in the following output to the Excel sheet
    11/8/2013 0:00
    11/9/2013 0:00
    Both dates should be 11/9/2013.
    Yes, this is a defect in the range.Value property.
    You can work around it by using the range.Value2 property.  Or by not using type Date at all.
    (Aha!  I stumbled upon another alternative.  See comments below about creating a column of date/times.)
    I always use type Double instead of type Date because VBA sometimes does "strange" things with type Date expressions.
    In the rare circumstances where VBA requires type Date, I use CDate(doubleVariable).  That does not change the internal representation of doubleVariable.
    The following might help to understand the problem. [1]
    Sub doit()
        Dim d As Date
        Columns("a:c").Clear
        d = Evaluate("value(""11/08/2013 23:59:59.499"")")
        Range("a1").Value = d
        Range("b1").Value2 = d
        Range("c1").Formula = "=b1"
        d = Evaluate("value(""11/08/2013 23:59:59.500"")")
        Range("a2").Value = d
        Range("b2").Value2 = d
        Range("c2").Formula = "=b2"
        Range("a1:b2").NumberFormat = "mm/dd/yyyy hh:mm:ss.000"
        Range("c1:c2").NumberFormat = "mm/dd/yyyy hh:mm"
        Columns("a:c").AutoFit
    End Sub
    The results are:
    A1: 11/08/2013 23:59:59.000
    B1: 11/08/2013 23:59:59.499
    C1: 11/08/2013 23:59
    A2: 11/08/2013 00:00:00.000
    B2: 11/08/2013 23:59:59.500
    C2: 11/09/2013 00:00
    Note that C2 is correct.  So the problem is in VBA, not Excel. [2]
    When VBA assigns an expression of type Date to range.Value, it rounds to the second.  (For no good reason, IMHO.)
    However, VBA makes a rookie error in the rounding:  it rounds time separately, failing to add any integer carry-over to the date.
    As demonstrated in C2, when formatting time as h, h:mm or h:mm:ss, Excel does round to the second.  But it does it correctly.
    Allan wrote:
    The value 41586.9999 is just 0.1 second short of midnight. If Excel truncated the last second instead of rounding the the date in the Excel cell should be 11/8/2013 23:59:59
    I think rounding to the second (or fraction of a second indicated by the format) is the correct thing to do.
    If Excel (and VBA) truncated to the second, we might have the following undesirable situation.
    A1:  =VALUE("11/08/2013 23:59:59")
    formatted as mm/dd/yyyy hh:mm:ss displays 11/08/2013 23:59:59
    B1:  =MOD(A1,1)
    formatted as hh:mm:ss displays 23:59:58 (!)
    because the representation of 23:59:59 in A1 is infinitesimally smaller than the time constant 23:59:59. [3]
    Allan wrote:
    The error is that when using VBA code to create a column of dates by hour you sometimes get an incorrect result in the Excel cell. I fixed this issue by adding 0.1 second to the date before writing to the Excel cell.
    Adding 0.1 might be adequate for your situation.  But in general, it works only by coincidence.
    Allan wrote:
    There are other ways to work around this bug but I think that this is the most efficient.
    That depends on how you implemented the loop, which you did not share.  Based on your previous example, I assume your "efficient" implementation is something like the following:
    Dim datDate as Date
    datDate = 41586
    For i = 1 To n
    datDate = DateAdd("h", 1, datDate)
    ActiveWorkbook.Sheets("Sheet1").Cells(20 + i, 2).Value = datDate + 0.1/86400
    Next i
    The following is probably many times faster, although you might not notice if n is very small.
    Dim d0 As Date, d As Date, v(1 To n, 1 To 1) As Date
    d0 = #11/8/2013#
    For i = 1 To n
        ' multiply to minimize "arithmetic drift": cumulative floating-point anomalies
        d = d0 + i * TimeSerial(1, 0, 0)
        ' round to the second
        v(i, 1) = Int(d * 86400 + 0.5) / 86400
    Next
    ActiveWorkbook.Sheets("Sheet1").Cells(21, 2).Resize(n, 1).Value = v
    Actually, the explicit rounding is probably redundant, considering the 1-hour increment.  It is probably sufficient for the loop to be:
    For i = 1 To n
        ' multiply to minimize "arithmetic drift": cumulative floating-point anomalies
        v(i,1) = d0 + i * TimeSerial(1, 0, 0)
    Next
    As noted above, in general, it would be better to use range.Value2 instead of range.Value.
    I use range.Value here to make an "aha!" point:  when "v" is an array, range.Value does not round or otherwise alter the assigned values.
    [EDIT] Also, I use type Date here to minimize differences and focus on "teaching" points.  Normally, I use type Double.  No reason not to.
    [1] I use Evaluate("value(""11/08/2013 23:59:59.500"")") instead of #11/08/2013 23:59:59# + 0.5/86400 because the latter is infinitesimally
    less than 11/08/2013 23:59:59.500, due to floating-point arithmetic anomalies.  So it does not demonstrate the problem because VBA correctly
    rounds down to 11/08/2013 23:59:59.
    [2] Arguably, the problem could be in Excel's handling of the data passed from VBA, set up by the range.Value property.  But that seems unlikely since I cannot think of any reason why Excel would round to the second.  Normally, it does not unless
    the cell format requires it. [EDIT] Even then, Excel rounds only for display purposes; it does not round the underlying actual value (unless the "Precision as displayed" option is set).
    [3] Arguably, we should write --TEXT(MOD(A1,1),"hh:mm:ss") instead of simply MOD(A1,1), because MOD(A1,1) is not the same internal representation.  But the point remains the same:  if Excel (and VBA) truncated to the second, that would
    result in 23:59:58 instead of 23:59:59 as expected.

  • Blog Post Date Bug

    Hi,
    I use windows live writer to publish to my blog on BC and other blog platforms.
    When I publish from live writer with today at the post date, the post is not visible on the blog site at all.
    I enter the admin of BC, change the blog post date to yesterday and the post becomes visible.
    Thought this was an issue with live writer so I changed the published date back to today.  Post disappeared again.
    Changed it back to the day before and it appeared.
    This is very buggy.   In fact I am finding the blog set up in general full of issues, like the RSS feed does not work.
    What can be done about this?  I would like to press publish and have it actually published not  have to log in and edit each post each time....
    Paul

    My apologies Paul I was referencing the RSS troubles. 
    In regards to the post date with blogs using Live Writer I'm not aware of any related bugs referencing this as a known issue. 
    If still an on-going issue I recommend submitting a case to us with the details and steps showcasing what you are experiencing so we can replicate and fix this ASAP. 
    I would suggest using Jing to capture in a short video of what you are experiencing attached along your case to us. 
    Admin panel -> help&support (log a ticket)
    Jing -> http://www.jingproject.com/
    Kind regards,
    -Sidney

  • Customize date bug in Yosemite?

    I've customized my system default date under System Prefs/Language and Region/Advanced/Dates to military format (e.g., 2015.02.03). However, System Prefs/Date and Time continues to show the standard 2/ 3/2015. The problem affects my Microsoft Outlook Calendar which also shows 2/ 3/2015 instead of 2015.02.03.  What hasn't worked: deleting the System Preferences plist; repairing permissions; resetting the date back to default and re-entering the customized date.  Is this a bug? Any other suggestions?  Thanks.

    I have the same version of Portal and the same problem. I have found no resolution either. Also, avoid aliasing the field the same name as the field. Doing this causes portal to override your formatting and access the field as a date, and truncates the century information. Responses to my post on technet resulted in no solution.
    null

  • Stacked bar/null data bug.

    Hi All,
    Despite a number of posts reporting this bug in previous releases of Apex I am facing a simmilar issue as people before me...
    I am trying to generate a stacked bar graph for a given period of time. To make my point clear let me provide an example:
    1. I have a "project" table with info such as project_due_date and project_complete_date....
    2. Now lets say I have 2 projects which were completed in JAN, and 3 projects which were completed in MAR (no projects were done in FEB)
    3. Now the following SQL:
    SELECT null LINK,
    to_char(project_due_date,'MONTH') Month,
    count(*) Late
    FROM dm_project
    -- Check for projects within due date (SLA)
    WHERE project_complete_date < project_due_date
    -- Group them by every month
    GROUP BY to_char(project_due_date,'MONTH')
    Will give me something like:
    LINK MONTH LATE
    - JANUARY 2
    - MARCH 3
    This will generate a graph which will display the number of projects that where completed within given time (< project_due_date).
    BUT !
    The above will only show 2 bars with January and March as X-Axis Labels... Obviously this is not a very representative way of displaying data.
    Now, as a workaround I would like to build my queary so that it would return something like:
    LINK MONTH LATE
    - JANUARY 2
    - FEBRUARY 0
    - MARCH 3
    - APRIL 0
    -...etc...
    - DECEMBER 0
    So my question is finally this:
    Is there anyway to get the months of the given year in SQL which I could use as my label value of the graph?
    Kind regards,
    Pawel.

    Unfortunatelly... the above two queries still don't appear on the graph. This is very surprising to me as both statements return correct (I think) output:
    Query 1
    ======
    SELECT NULL AS link,
    TO_CHAR ( TRUNC ( c.day, 'MONTH' ), 'MONTH' ) AS period,
    COUNT(p.project_complete_date) AS late
    FROM dm_project p,
    dm_calendar c
    WHERE
    -- PROJECTS OUT OF TIME
    NVL ( p.project_due_date, c.day ) < NVL ( p.project_complete_date, c.day + 1 )
    AND c.day = TRUNC ( c.day, 'MONTH' )
    AND TRUNC ( p.project_due_date (+), 'MONTH' ) = TRUNC ( c.day, 'MONTH' )
    AND c.day >= '01-JAN-06'
    AND c.day <= '31-DEC-06'
    GROUP BY TRUNC ( c.day, 'MONTH' )
    ORDER BY TRUNC ( c.day, 'MONTH' )
    Gives output:
    ==========
    LINK PERIOD LATE
    - JANUARY 0
    - FEBRUARY 0
    - MARCH 0
    - APRIL 0
    - MAY 0
    - JUNE 0
    - JULY 0
    - AUGUST 0
    - SEPTEMBER 0
    - OCTOBER 0
    - NOVEMBER 2
    - DECEMBER 1
    Query 2
    =======
    SELECT NULL AS link,
    TO_CHAR ( TRUNC ( c.day, 'MONTH' ), 'MONTH' ) AS period,
    COUNT(p.project_complete_date) AS late
    FROM dm_project p,
    dm_calendar c
    WHERE
    -- PROJECTS ON TIME
    NVL ( p.project_complete_date, c.day ) < NVL ( p.project_due_date, c.day + 1 )
    AND c.day = TRUNC ( c.day, 'MONTH' )
    AND TRUNC ( p.project_due_date (+), 'MONTH' ) = TRUNC ( c.day, 'MONTH' )
    AND c.day >= '01-JAN-06'
    AND c.day <= '31-DEC-06'
    GROUP BY TRUNC ( c.day, 'MONTH' )
    ORDER BY TRUNC ( c.day, 'MONTH' )
    Gives output
    =========
    LINK PERIOD LATE
    - JANUARY 0
    - FEBRUARY 0
    - MARCH 0
    - APRIL 0
    - MAY 0
    - JUNE 0
    - JULY 0
    - AUGUST 0
    - SEPTEMBER 0
    - OCTOBER 0
    - NOVEMBER 1
    - DECEMBER 1
    Can anyone tells me why I am not able to simply display both series on a stacked bar graph?
    Message was edited by:
    padmocho

  • IPhone Date BUG

    Hi, I've an 3Gs iphone with iOS4 and I've notticed that the callendar has a bug. The October 17th disapeared when the day light savings time come. now my phone presents two times the October 16th, and some events were gone (those on Oct 17th).
    Is there any patch to correct this?

    Hello,
    I have the same problem, and it was the same even for previous versions of iPhone OS. I don't think it's a time zone issue, as I am living in Norway and the reports here are the same from various locations.
    However, I think I might have found a workaround for this problem. Normally I have my mail, contacts and calendar synced via Exchange. When I in addition to syncing with Exchange select "Sync contacts with Outlook" in the "info" tab in iTunes on my computer, the dates appear to be transferred correctly. But then again, this gives me several contact groups on my iPhone, whilst I really only want and need one group, the Exchange contacts. Anyway, the contacts appear only once when I select the "group" all contacts on my iPhone.
    Hope this can be of any help until the bug is fixed.

  • Is this a Date bug?

    before
    http://java.sun.com/j2se/1.5.0/docs/api/java/util/Date.html#before(java.util.Date)
    public boolean before(Date when)
    Tests if this date is before the specified date.
    Parameters:
    when - a date.
    Returns:
    true if and only if the instant of time represented by this Date object is strictly earlier than the instant represented by when; false otherwise.
    Throws:
    NullPointerException - if when is null.
    ==========================================================
    try{
              String testDate = "02-01-3889";
              String beforeDate = "12-31-3887";
              // java bug
              Date dt = DateTest.getDateFromString( testDate , "dd-MM-yyyy" );
              Date beforeDt = DateTest.getDateFromString( beforeDate, "dd-MM-yyyy");
              System.out.println( testDate + " after: " + beforeDate + "\t" + dt.after( beforeDt ));
    System.out.println( beforeDate + "after: " + testDate + "\t" + beforeDt.after( dt ));
         catch( ParseException ex ){
    02-01-3889 after: 12-31-3887 false
    12-31-3887after: 02-01-3889 true
    The outcome doesn't match API description

    A) I am not a rhino to have a thicker skin
    B) There are other forums and venues for humor
    C) If poster has no valid contribution to add, it
    would simply be polite not to post anything.
    I do hope all of us have a nice day.
    Cheers!His comment was a gentle poke, hopefully helping you to see the problem. It was much better that calling you a moron who should not be allowed near a computer, which after your last comment may happen soon. The fact is your date format does not match the string you are parsing, unless we now have 31 months in a year.
    ~Tim
    EDIT: I can't believe that <M0R0N> is blocked.
    Message was edited by:
    SomeoneElse

Maybe you are looking for