Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> HELP with SQL codes

HELP with SQL codes

From: Puppet Master <mechhunter_at_rocketmail.com>
Date: Mon, 11 Sep 2000 05:47:56 GMT
Message-ID: <39bc70e9.6077545@news.iinet.net.au>

Hi,
I am playing with TO_DATE format and I am having a difficult time with it. Below is a code that I do not know why it is not working. It should just be picking up date AFTER 1981 but as you can see on the first line, it is picking up date before 1981 as well (1980) - What am I doing wrong ?

If I put it was /YY, no rows will be picked up.

SQL> SELECT hiredate
  2 FROM emp
  3 WHERE hiredate > TO_DATE('01/01/81', 'DD/MM/YYYY');

HIREDATE


17-DEC-80
20-FEB-81
22-FEB-81
02-APR-81
28-SEP-81
01-MAY-81
09-JUN-81
19-APR-87
17-NOV-81
08-SEP-81
23-MAY-87
03-DEC-81
03-DEC-81
23-JAN-82

14 rows selected.

Beside that, can I also ask if there IS a code that will let me see the result of a TO_DATE is :
Like with the above syntax, it will be nice for me to see the result of the converted the 01/01/81.

Thank you,

Arthur Received on Mon Sep 11 2000 - 00:47:56 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US