mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 19:29:26 +02:00
* Patch from Luiz Americo to fix access violation when transforming date field
git-svn-id: trunk@13867 -
This commit is contained in:
parent
cb29ddbd04
commit
c8d72ce4aa
@ -660,8 +660,11 @@ begin
|
||||
Result:=PX_get_data_long(FDoc,Buf,flen,@longv)>0;
|
||||
If Result then
|
||||
begin
|
||||
PX_SdnToGregorian(longv+1721425,@Y,@M,@D);
|
||||
PDateTime(Buffer)^:=EncodeDate(Y,M,D);
|
||||
// 1721425 is the number of the days between the start of the
|
||||
// julian calendar (4714 BC) and jan-00-0000 (Paradox base date)
|
||||
// 2415019 is the number of the days between the start of the
|
||||
// julian calendar (4714 BC) and dec-30-1899 (TDateTime base date)
|
||||
PDateTime(Buffer)^:=Longv+1721425-2415019;
|
||||
end;
|
||||
end;
|
||||
pxfShort:
|
||||
|
Loading…
Reference in New Issue
Block a user