Fix DateTime code