Finally fixed problems with dates, datetimes and times