I have a question relating to SQL and dates. I have a database which contains a number of items. Each time the program is executed, the database is checked to see if an item will be out of date within the next 21 days. The problem that I am having is this: the query is not returning any items which exceed the date given.
Here is basically what I am doing:
SQL Statement (within the query):
Select * from ALL_ITEMS
where :ThisDate > Items_Date
the :ThisDate parameter is typed as a DateTime, as is the Items_Date
The procedure I am using to check these items is:
Var Check_Date: TDateTime;
Check_Date := DATE + 21;
ItemQuery.Active := False;
ItemQuery.ParamByName('ThisDate').asDataTime := ChecK_Date;
ItemQuery.Active := True;
Ok, from this, I get no records in the query at all.
Any ideas at all. The program is in very early development stages, therefore, I am quite happy to change anything to get this thing working properly!
Thanks for any help you can provide.
If you have any examples, please forward them to firstname.lastname@example.org if possible.
OH! And as a last second thought, any ideas how to make a Paradox database use full dates?? ie DD/MM/YYYY??.