AsDAteTime makes 1 plus day
Posted: Tue 14 Nov 2006 17:04
Hi!
My problem:
I hva sql sentence SELECT DATE(:d) AS DATE , field1 FROM table WHERE ....
ParamByName('d').AsDate:=info_date.Date; //info_date is calendar
if param= 2006-11-12 ...and my result is 2006-11-13
WHY?
then I put my paremeter like this
ParamByName('d').AsString:=FormatdateTime('YYYY-MM-DD',info_date.Date);
..works fine...but on some other computer I get message
you have an error in your MYSQL syntax. Check the amnual that coresponds...to use near '('2006-11-13') AS DATE, field1 FROM...'
thanks!
My problem:
I hva sql sentence SELECT DATE(:d) AS DATE , field1 FROM table WHERE ....
ParamByName('d').AsDate:=info_date.Date; //info_date is calendar
if param= 2006-11-12 ...and my result is 2006-11-13
WHY?
then I put my paremeter like this
ParamByName('d').AsString:=FormatdateTime('YYYY-MM-DD',info_date.Date);
..works fine...but on some other computer I get message
you have an error in your MYSQL syntax. Check the amnual that coresponds...to use near '('2006-11-13') AS DATE, field1 FROM...'
thanks!