Passing TDateTime as input parameter is the same as passing TDate: it truncate time.

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Matteo
Posts: 9
Joined: Wed 07 Jun 2006 14:16
Location: Trieste

Passing TDateTime as input parameter is the same as passing TDate: it truncate time.

Post by Matteo » Wed 09 Aug 2006 14:20

I'm using TOraStoredProc. I pass as input parameter two tDateTime parameters different by their time.
My store proc behaves like the two parameter values have the same time.
I suppose ODAC truncate time part while assigning values to TDateTime this way:
OraStoredProc.Params.CreateParam(ftDateTime, 'startdatetime', ptInput).AsDateTime := StrToDateTime(Search1.beginningdate)

Does anybody know if there's a bug 'working' like that in ODAC.

Search1.beginningdate is a string like '03/08/2006 12:23:24', of course.

Can anybody help me?
Thanks

Guest

Post by Guest » Wed 09 Aug 2006 14:24

Sorry, I've forget ODAC version: 5.70.1.33 for Delphi 7.

Bye
Matteo

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 10 Aug 2006 14:20

We cannot reproduce the problem. ODAC doesn't truncate time part for ftDateTime parameters.

Don Horn
Posts: 6
Joined: Sat 12 Aug 2006 21:08
Location: Atlanta, GA

Post by Don Horn » Tue 15 Aug 2006 12:39

You could try passing the date and time as a string and converting it in the SP with a to_date().

Post Reply