shadrxninga Posted November 16, 2011 Share Posted November 16, 2011 I've got this string from an rss feed "2011-11-16T06:05:15Z" , I'm not good a regex at all... I would love to be but I don't have time to learn it at the moment. What I was hoping someone good do was give me some regular expressions that would separate the date out, So I would be able to make 4 variables that contained the following: $year = "2011" $month = "11" $date = "16" $time = "06:05:15" This is so I can then return the string as "16 Nov, 2011 06:05:15" If you know a better way to change the first date to the second one that would also be fantastic, or though I think this will have to require regex. Which is why I am posting it here. Thanks a bunch shadrxninga Quote Link to comment Share on other sites More sharing options...
trq Posted November 16, 2011 Share Posted November 16, 2011 Take a look at strtotime and date. echo date("d M, Y h:i:s", strtotime('2011-11-16T06:05:15Z')); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.