Reputation: 1821
I want to get this date's timestamp from string. I'm trying:
DateTime::createFromFormat("Y-m-d", "2015-05-18T23:45:21.604Z");
But it returns nothing. I don't know which format is this.
Upvotes: 0
Views: 135
Reputation:
try this,
$date = date_create_from_format('d/M/Y:H:i:s', '2015-05-18T23:45:21.604Z');
$date->getTimestamp();
Upvotes: 1