I want to parse the following string to a DateTime() Object in PHP:
2017-03-03T09:06:41.187
I try to do this as follows:
$stateCreatedOn = DateTime::createFromFormat('Y-m-dTH:i:s.u','2017-03-03T09:06:41.187');
var_dump($stateCreatedOn); // -> Returns false
However, parsing doesn´t work and the variable is always set to false. Anybody an idea what´s wrong with my date format specification?
Thanks a lot in advance!