Change data type for dates, update tests