Remove whitespace from around the datetime string.