[Lazarus] Microsft Access Date Select statment

Larry Dalton larrydalton71 at gmail.com
Sat Mar 25 01:25:08 CET 2023


Thanks. I’ll learn the parameters.

Sent from my iPhone

> On Mar 24, 2023, at 19:39, Werner Pamler via lazarus <lazarus at lists.lazarus-ide.org> wrote:
> 
> Am 24.03.2023 um 21:48 schrieb Larry Dalton via lazarus:
>> 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.
> 
> Enclose the date/time by '#', put the date parts in year/month/day order and separate them by slashes:
> 
>     Query.SQL.Add('SELECT * FROM Events WHERE (StartTime >= #2019/01/15#) AND (StartTime < #2019/01/16#)');
> 
> But using query parameters is always the better way.
> 
> -- 
> _______________________________________________
> lazarus mailing list
> lazarus at lists.lazarus-ide.org
> https://lists.lazarus-ide.org/listinfo/lazarus


More information about the lazarus mailing list