On 1/31/2012 07:59, Michael Joyner wrote:
to be able to compare dates as strings, you should always set the format as
year-month-day
+100
i tend to use yyyymmddhhkkssjjjjj where kk is minutes and jj us hundreths of
seconds where available... at least this for _simple_ before/equal/after
comparisons... anything else requires more work ;)
On Tue, Jan 31, 2012 at 7:55 AM, Guionardo Furlan <[email protected]
<mailto:[email protected]>> wrote:
This code works in delphi?
Comparing strings doesn´t work for dates, I guess.
Using mm/dd/yyyy, "05/01/2012" is less/before than "05/02/2011"
2012/1/30 Koenraad Lelong <[email protected]
<mailto:[email protected]>>:
> Hi,
>
> Lazarus 0.9.30
>
> I want to filter a TDbf. The field is a date.
> When I try in Filter in Lazarus :
> DATUM >= '1/1/2011'
> or
> DATUM >= "1/1/2011"
> or
> DATUM >= '1.1.2011'
>
> In my application :
> tblTik.Filter:='DATUM>='''+DateToStr(XferStart)+'''';
>
> I get an error :
> Index based on unknown field ">=".
>
> What am I doing wrong ?
>
> Regards,
>
> Koenraad Lelong.
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus