Changed date formatting to mysql datetime