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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBC vs OLEDB date difference?

Status
Not open for further replies.

bobhagan

MIS
Apr 28, 2001
111
US
I am translating a group of reports from CR.8.0 to CR.NET.

Several use

... AND {STATUS.STATUS_DT} >= {?StartDt}
AND {STATUS.STATUS_DT} <= {?EndDt}
in the query.

In the CR8 version the query returns data from the day of EndDt. The CR.Net version returns only up to the day BEFORE; as if the query said < {?EndDt}.

The CR8.0 version runs on ODBC, the CR.Net version on OLEDB. They run against the same Oracle 8.0.5 data. Both reports are set to use DateTime as Date. When I run this a an Oracle query, if I use TRUNC on the field and param, it works properly, so this has something to do with the time piece of the field.

I can work around this, but why does this happen?

Thanks
BobH
 
Are your fields DateTime type? if so when you pass the parameter you may encounter the problems of the time

eg

10/10/2005 00:00:01 will not show if you say where date <= 10/10/2005
because the date is greater.

try AND date({STATUS.STATUS_DT}) >= {?StartDt}
AND date({STATUS.STATUS_DT}) <= {?EndDt}



-Mo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top