Convert dates and integers on write