>>The solution which has worked has been to change .AsDateTime to .AsDate
>>wherever necessary.
>>Anyone encounter a scenario like this before? Since I am using D3 it may
>>well have been addressed in D4 or later.
> My suspicion is the TDateTimePicker. Looks like its returning Date & Time
> when Date is selected in "Kind". Your setting of parameter using asdate is
> the way to go - but you don't need it universally.
> Using two edit fields followed by strtodate works fine with parameters set
> asdatetime and defined as datetime in the query.
> Also Params[0].asdatetime := strtodate(datetostr(DateTimePicker1.Date));
> works fine.
How about
Params[0].AsDateTime := Trunc(DateTimePicker1.Date);
this should remove any fractional portion...
--
Aaron@home
---------------------------------------------------------------------------
New Zealand Delphi Users group - Database List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz