fixing date conversion logic
fixing date conversion logic