Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Dates and Oracle
nasof_at_my-dejanews.com writes:
>You want your SQL statement to look like:
>> select * from table1 where to_char(the_date, 'dd-mm-yyyy') = '01-07-1998'
>Probably the best method is to truncate the time off the date:
>> select * from table1 where trunc(the_date) = '1-JUL-98'
If you don't need the time it's better to do the insert as ... values (trunc(sysdate))
that way you can index the date column too Received on Fri Jul 03 1998 - 14:52:47 CDT
![]() |
![]() |