[DUG] firebird query parameters behaving oddly
Mike Stokes
mike at webdata.co.nz
Tue Jul 10 14:42:44 NZST 2007
True,
So to get past this look at using
function EncodeDateTime(const AYear, AMonth, ADay, AHour, AMinute,
ASecond, AMilliSecond: Word):TDateTime;
this is found in DateUtils.
Then you can break your string date time value into parts in order to
convert them to a TDateTime value.
But Cheng Wei's solution also works e.g. '10-jul-2007'
All the best,
Mike
Jeremy North wrote:
>> For simple date time conversions check the ShortDateFormat :=
>> 'dd/mm/yyyy'; before converting StrToDateDef(MyDate, 0);
>
> FWIW setting those variables in SysUtils (ShortDateFormat et al.) is
> not thread safe. So if you are using threads you may run into issues.
>
> cheers,
> Jeremy
>
>
>
More information about the Delphi
mailing list