Changed date format for saving on to the database