Fix date handling

Dates were being treated as datetimes. Now, if the type is 'date, it is treated as a date and shows up in excel as just a date.