Fix DateType for 32bits computers.

Fix an issue due to 32bits machines, date can be only between 1902-2037.
Simply not add date if false.
Issues: #5227 #5554