[Lazarus] Microsft Access Date Select statment

Larry Dalton larrydalton71 at gmail.com
Fri Mar 24 21:48:57 CET 2023

Using Microsoft Access Driver (*.mdb, *.accdb), on Windows 11, with Lazarus

'Select * from bbt1300
Where Trans_date between beginning_date and ending_date;'
where all three are datetimes;

No matter how I format the beginning and ending dates, it doesn't work. If
I format the dates in quoted strings ('20230101') or any variation, I get
the incompatible types errors.

if I format the dates as unquoted strings, (20230101, 01012023,
2023-02-01,2023/02/01) or any other variations, if pulls all the records in
the table, or no records at all.

I have even used the DateTimeToFileTime value as longints converted to
strings without quotes. The pulled no records.

I have to use MS Access for this application. Any help out there?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20230324/684a7887/attachment.htm>

More information about the lazarus mailing list