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

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

Post Reply
hugleo
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: 31.08.2009, 15:16

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

Post 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.
hugleo
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: 31.08.2009, 15:16

Post by hugleo »

I've used
DelphiDateTimePicker.Time := QRYResult1.FieldByName('MYSQLTimeField').AsDateTime;
and solved the problem.
Post Reply