Home » RDBMS Server » Server Administration » date time and long number
date time and long number [message #372781] Thu, 08 March 2001 23:42 Go to next message
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 Go to previous message
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.
Previous Topic: "recover standby database until cancel" in script
Next Topic: executing batch sql statements in oracle
Goto Forum:
  


Current Time: Sat Jun 29 13:53:13 CDT 2024