You are not logged in.
Pages: 1
I will try to handle it, but I believe that ab is already being processed
SynVirtualDataSet.pas
+Add
function DateTimeToNative(DataType: TFieldType; Data: TDateTime): TDateTimeRec;
var
TimeStamp: TTimeStamp;
begin
TimeStamp := DateTimeToTimeStamp(Data);
case DataType of
ftDate: Result.Date := TimeStamp.Date;
ftTime: Result.Time := TimeStamp.Time;
else
Result.DateTime := TimeStampToMSecs(TimeStamp);
end;
end;
...
ftDate, ftTime:
if PDateTime(Data)^=0 then
result := false else begin
TS := DateTimeToTimeStamp(PDateTime(Data)^);
if (TS.Time<0) or (TS.Date<=0) then
result := false else // matches ValidateTimeStamp() expectations
case Field.DataType of
ftDate: PDateTimeRec(Dest)^.Date := TS.Date;
ftTime: PDateTimeRec(Dest)^.Time := TS.Time;
end;
end;
ftDateTime:
// Change to this.
TDateTimeRec(Dest^) := DateTimeToNative(Field.DataType, TDateTime(Data^));
//PDateTimeRec(Dest)^.DateTime := PDateTime(Data)^;
Pages: 1