php - can't convert date from string -


i want date's timestamp string. i'm trying:

datetime::createfromformat("y-m-d", "2015-05-18t23:45:21.604z"); 

but returns nothing. don't know format this.

try this,

$date = date_create_from_format('d/m/y:h:i:s', '2015-05-18t23:45:21.604z'); $date->gettimestamp(); 

Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -