Question about Oracle date/time formats.

Haircut

Platinum Member
Apr 23, 2000
2,248
0
0
OK, I'm assuming you're trying something like

select column1
from table1
where date_col > '01-may-2003 14:00:00'

and it is giving you an ORA-01830 error.

If this is the case then you need to alter your session so that Oracle can recognise the appropriate string as a valid date format.
You can use

ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS';

where the string is the format of the date/time format that you want to use.

If this isn't the problem can you give a few more details.
 

de9ali

Member
Nov 8, 2002
176
0
0
Thanks Haircut, I found another solution using the to_date function...

...
where my_date = to_date('2003-05-12 9:00:00','YYYY-MM-DD HH24:MI:SS')

Thanks.