Topic: Problem with String-Date Conversion

Hello,i have a problem with this:
s_Ris :=VarToStr(SQLExecute('SELECT dataConf FROM conferme WHERE codConf = "'+Lavorazione.txb_OC.text+'"'));
     if (s_Ris <> '') then dataInsOC := StrToDate(s_Ris);

where dataInsOC  is TDate type

The problem is conversion String to Date, this date after is assigned at Data Time Picker element.

Thank's

Post's attachments

Attachment icon error_conversion.jpg 69.8 kb, 392 downloads since 2014-08-09 

Re: Problem with String-Date Conversion

Hello,


Thank you for bug report.

Instead function StrToDate use SQLDateTimeToDateTime, which added in version 1.43
Please, download here:
https://www.dropbox.com/s/4qdlk4pouldrz … 201.43.zip


s_Ris :=VarToStr(SQLExecute('SELECT dataConf FROM conferme WHERE codConf = "'+Lavorazione.txb_OC.text+'"'));
if (s_Ris <> '') then dataInsOC := SQLDateTimeToDateTime(s_Ris);
Dmitry.

Re: Problem with String-Date Conversion

Thank's for your work