Fix order of datetime parsing