datetime formatting fixes and simplifications