do proper date conversion