Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query Engine Error

Status
Not open for further replies.

jcl5

IS-IT--Management
Dec 6, 2002
89
GB
Hi guys

Using Oracle 8i and CR10

I have two fields which are both datetime fields in the database. I am trying to perform a calculation that tells me the number of days between those two dates i.e. datediff ('d',{COMS.COMSTART_DATE},{COMS.COMTRANS_DATE})
When I run it the following error appears:-

'Query Engine Error:22007[Oracle][ODBC]Invalid datetime format'

I'm assuming that it has something to do with the ODBC driver which is Oracle 8.01.07.810 - any ideas?
The date fields are displaying as 29/01/1999 00:00:00

Also, how do you connect using the native Crystal drivers?

Thanks

jcl5
 
I'm not certain that CR 10 has a native Oracle driver still, but if so it should be listed under More Data Sources as Oracle Server.

There are advanced Oracle datetimes that may cause problems as well, such as Timestamp with timezone.

You say that the date fields are displaying as 29/01/1999 00:00:00

Where are they displaying, in Crystal?

You should be able to use the Oracle datediff function and have the dtaabase return the value for you by using a SQL Expression, or by using the Add Command to paste in the entire SQL to be used as the datasource, inclusive of a datediff function.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top