Page 1 of 1

MySQL fields with '00:00:00' values are converted to NULL

Posted: 28.01.2010, 14:32
by hugleo
QRYResult1.FieldByName('MYSQLTimeField').Value is returning null when it should return the '00:00:00' converted to time format

Example:

DelphiDateTimePicker.Time := QRYResult1.FieldByName('MYSQLTimeField').Value;
I'm getting a problem about null value. QRYResult1.FieldByName('MYSQLTimeField').Value is returning null value but I think the correct zeos Value must return something like StrToTime('00:00');

I am sure that the value of the mysql time field is '00:00:00' and not null value.

Posted: 28.01.2010, 14:51
by hugleo
I've used
DelphiDateTimePicker.Time := QRYResult1.FieldByName('MYSQLTimeField').AsDateTime;
and solved the problem.