Hi Koen,
MySQl has
CASE and
CAST functions but it doesn't have logical/boolean data type. You'll get 1/0 instead of true/false.
Try (not tested)
select
CAST(tlUpdate AS datetime) AS tlUpdate,
CASE WHEN online = 'TRUE' THEN TRUE ELSE FALSE END AS online
from HORSART_WORKS
>
>Indeed lnResult gives -1.
>I am using a mySQL Database with VFP9.
>Tried various options of cast but dont seem to be able to find the correct syntax to convert a mySQL.characterfield with possible .null. values into a correct VFP.datetime , nor the mySQL.charaterfield and into VFP.logical.
>Have now constructed something which does the job by means of a second cursor.
>So problem solved.
>
>Thanks for support.
>
>Best regards,
>
>Koen
--sb--