Oracle Date Compair

New to Oracle. Having problems with using a date file in a Where statment. Where S-Date = '12/10/2009'. I have records with S-Date of 10-DEC-09 in the table but get no records returned. Field is formated as date time. Thanks for the help. David

Comments

  • Hi,

    HELP CAN GIVE YOU 2 FUNCTIONS:

    1. TO_DATE
    2. TO_CHAR

    EXAMPLE USAGE 1:
    [code]
    SELECT
    CASE WHEN TO_DATE('10-DEC-09','DD-MON-YY')=TO_DATE('12/10/2009','MM/DD/YYYY') THEN 'ARE EQUAL' ELSE 'NOT EQUAL' END AS CMP_RESULT
    FROM DUAL;
    [/code]

    REGARDS,
    [link=http://www.shs-g.com]www.shs-g.com[/link]


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion