handle date when update