Fix datetime attribute