[fpc-pascal] Implicit conversion problem with TDate type

Gabor Boros gaborboros at yahoo.com
Wed Nov 2 11:25:49 CET 2016

Hi All,

I use MWA's IBX for Firebird connection and have problem with date 
parameters. Tony provided to me a test program a suggested write to the 
FPC list. The simple test program is:

program Project1;

uses Variants, Sysutils;

var V: variant;
     D: TDate;

   D := EncodeDate(2016,10,20);
   V := D;
   writeln('date is ',VarType(D));

The result is: "date is 5" (varDouble)

If modify D: TDate; to D: TDateTime; the result is "date is 7" (varDate)

I (We) missed something or is this a bug?


More information about the fpc-pascal mailing list