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

Home -> Community -> Usenet -> c.d.o.server -> Re: Dates and Oracle

Re: Dates and Oracle

From: Ismo Tuononen <ismo_at_sasu1.carelian.fi>
Date: 3 Jul 1998 19:52:47 GMT
Message-ID: <6njcqf$l7d$1@hiisi.inet.fi>


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

Original text of this message

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