Fix datetime format issue