I try to get list of date from table and then do some calculation on it and put it back to the database.If seems like encodedate function cannot work with database as i wrote this code.WHy?
**************************
**********
**********
**********
**
SQL.Add('SELECT TheDate');
SQL.Add(' FROM DayToSchool');
open;
vweekday := EncodeDate(FieldByName('Th
eDate').As
DateTime);
**************************
**********
**********
**********
**
SQL.Add('SELECT TheDate');
SQL.Add(' FROM DayToSchool');
open;
vday:= (FieldByName('TheDate').As
String);
vweekday := EncodeDate(month, day, year);
how to call TheDate which contain a list of date from the table as shown above and do some calculation as shown below
if (a<b) then
answer
else
no answer
then i want to put the answer back to database.
Update table set answer where TheDate = TheDate
My question i want to ask here is how can i get list of theDate out from database and do some calculation then put it back to
table.Problem is not consist of one record but many record where my program will automatically do the calculation for me. Associate with Delphi
Start Free Trial