Handle dates as object outside the database, as string in the database