ShowMessage(DateTimeToStr(data) + ' vs ' + DateTimeToStr(VarToDateTime(V)));
Update: I think the problem is that the last millisecond of the month is very close to 0:00:00 the next day, that is, the TDateTime (mainly double ) is very close to an integer (for example, 41029.9999999884 very close to 41029 ), and therefore, the VarToStr function accepts decimal values as numeric fuses.
source share