added date conversion logic. thanks keith.