Parse and format W3CDTF datetime strings