Test date conversion