mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 05:40:20 +02:00
* Patch from Joao Morais to fix the storage of floating point, time and timestamp fields on a PgSQL database
git-svn-id: trunk@11128 -
This commit is contained in:
parent
2f0ca7d70c
commit
a33023e384
@ -568,10 +568,16 @@ begin
|
||||
for i := 0 to AParams.count -1 do if not AParams[i].IsNull then
|
||||
begin
|
||||
case AParams[i].DataType of
|
||||
ftdatetime : s := formatdatetime('YYYY-MM-DD',AParams[i].AsDateTime);
|
||||
ftdate : s := formatdatetime('YYYY-MM-DD',AParams[i].AsDateTime);
|
||||
else
|
||||
s := AParams[i].asstring;
|
||||
ftDateTime:
|
||||
s := FormatDateTime('yyyy-mm-dd hh:nn:ss', AParams[i].AsDateTime);
|
||||
ftDate:
|
||||
s := FormatDateTime('yyyy-mm-dd', AParams[i].AsDateTime);
|
||||
ftTime:
|
||||
s := FormatDateTime('hh:nn:ss', AParams[i].AsDateTime);
|
||||
ftFloat, ftCurrency:
|
||||
Str(AParams[i].AsFloat, s);
|
||||
else
|
||||
s := AParams[i].AsString;
|
||||
end; {case}
|
||||
GetMem(ar[i],length(s)+1);
|
||||
StrMove(PChar(ar[i]),Pchar(s),Length(S)+1);
|
||||
|
Loading…
Reference in New Issue
Block a user