date time and long number [message #372781] |
Thu, 08 March 2001 23:42 |
mikey
Messages: 4 Registered: March 2001
|
Junior Member |
|
|
does the date time data in Oracle store in long number? From the application interface, we enter data in format like '01/02/2001 10:30:00 PM' , when I run the query, I get the result in long number. When I compare it to SYSDATE ('SELECT * FROM Mytable WHERE entry_date < SYSDATE-60'), I get the error inconsistent data type. How can I compare the field 'entry_date' to the last 60 days? Thanks
|
|
|
Re: date time and long number [message #372795 is a reply to message #372781] |
Fri, 09 March 2001 12:16 |
Andrew again...
Messages: 270 Registered: July 2000
|
Senior Member |
|
|
if your entery_date field is of DATE datatype, then your query is correct (as long as you mean 60 days and not 2 months, else Sudir's solution is more correct).
get the table definition from SQL*plus with "descr Mytable". Try the quey from sqlplus.
|
|
|