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 -

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

c# - Block closing WPF window (from a different thread) if OpenFileDialog is open -