[Lazarus] Filtering on date with TDbf
Koenraad Lelong
lazarus1 at de-brouwerij.be
Wed Feb 1 11:28:02 CET 2012
On 01-02-12 10:52, Reinier Olislagers wrote:
> On 1-2-2012 10:40, Koenraad Lelong wrote:
>> AFAIK, TDbf is has no SQL, so this can't be used. Besides, with Firebird
>> ... where datum>= '5.9.2011'
>> is perfectly valid to have all dates from/including sept 5 2011, I just
>> checked.
> PMFJI, but don't, please DON'T use this date notation. dd/mm/yy or
> mm/dd/yy notations are often parsed depending on OS locale settings and
> in any case ambiguous between e.g. US and Europeans.
>
> As earlier suggested, try to be unambiguous in Firebird as well and use
> 'CCYY-MM-DD HH:NN:SS.nnnn' or 'YY-MM-DD HH:NN:SS.nnnn' (".nnnn" element
> is optional).
Hi,
For me one thing is clear now and hopefully really unabiguous : I'm
going to use 'CCYY-MM-DD HH:NN:SS.nnnn' or 'YY-MM-DD HH:NN:SS.nnnn' (and
without time-info if this is not needed).
I have long searched how to represent dates in an sql-select. Finally I
just copied the date from a select *, where the date is returned as
5.9.2011 for sept 5, 2011.
I don't think I will forget this now ;-)
Unfortunately, this does not help with the tdbf.
Thanks,
Koenraad.
More information about the Lazarus
mailing list