Php convert datetime from twitter feed -


hey have date 1 of twitter feeds:

tue apr 16 17:39:59 +0000 2013 

problem code below not seem format it?

$date = new datetime('tue apr 16 17:39:59 +0000 2013'); echo $date->format('y-m-d h:i:s'); 

it shows blank page.

what doing wrong?

try:

$date = datetime::createfromformat('d m j h:i:s o y', 'tue apr 16 17:39:59 +0000 2013'); echo $date->format('y-m-d h:i:s'); 

see in action


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -