Declare a TDateTime as a Const in Delphi
Ok, my reaction is a bit late, but here’s a solution for the newer Delphi’s. It uses implicit class overloaders so that records of this type can be used as if they are TDateTime variables. TDateRec = record year,month,day,hour,minute,second,millisecond:word; class operator implicit(aDateRec:TDateRec):TDateTime; class operator implicit(aDateTime:TDateTime):TDateRec; // not needed class operator implicit(aDateRec:TDateRec):String; // not needed class … Read more