I have a vector with a date as character
x <- "2015-02-01 09:05:23"
I want to convert it to a dateTime object
x <- as.POSIXct(strptime(x, "%Y-%m-%d %H:%M:%S"), tz = "GMT")
and then "T" as separator between date and time (see XML Schema) to get the following output
"2015-02-01T09:05:23"
How do I get the "T" separator into the string?