Fix type of date