[Lazarus] Filtering on date with TDbf

Michael Joyner mjoyner at vbservices.net
Tue Jan 31 13:59:52 CET 2012


to be able to compare dates as strings, you should always set the format as
year-month-day

On Tue, Jan 31, 2012 at 7:55 AM, Guionardo Furlan <guionardo at gmail.com>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 <lazarus1 at de-brouwerij.be>:
> > 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
> > Lazarus at lists.lazarus.freepascal.org
> > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>
>
> --
> Timeo hominem unius libri
> Cogito ergo sum - Carpe diem
>
> []s
> Guionardo Furlan
> http://guionardo.blogspot.com
> http://www.guionardofurlan.com.br
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>



-- 

   - Learn to speak Cherokee: http://www.cherokeelessons.com/
   - Cherokee Language Help BBS/Chat:
   http://www.cherokeelessons.com/phpBB3/viewforum.php?f=6
   - Cherokee Lessons PDF made with: http://www.lyx.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20120131/649bae8a/attachment-0003.html>


More information about the Lazarus mailing list