MS SQL Date and Time fields seen as TWideString fields by Delphi
Hi All,
I know this is not a SDAC created problem, but nevertheless, it is a problem for me, using SDAC and MS SQL tables with Date and Time fields. It's with Delphi 11.3 on Win 10 and 11.
The problem is that Delphi see MS SQL Date and Time fields as type FtWideString.
In my program I often use a construction like the below, to handle the contents of the fields:
Case msquery.fields[x].datatype of
FtDate : label1.caption := formatDatetime('dd-mm-yyyy',msquery.fields[x].value);
FtTime : label1.caption := formatDatetime('hh:mm:ss',msquery.fields[x].value);
end;
Do any of you have any proposals of how to solve this problem or have a smart fix to get around it ?
Regards
Soren