shahzad429 Posted May 29, 2012 Share Posted May 29, 2012 Hey I have a string eg 201106 which i want to display like June 2011 how can i do it?? Thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/263320-php-display-date-from-string/ Share on other sites More sharing options...
trq Posted May 29, 2012 Share Posted May 29, 2012 strtotime is generally used to covert a string to a date. However, your string is not your typical string representation. IS there a reason the formatting is so unusual and do you have any control over it? Quote Link to comment https://forums.phpfreaks.com/topic/263320-php-display-date-from-string/#findComment-1349476 Share on other sites More sharing options...
shahzad429 Posted May 29, 2012 Author Share Posted May 29, 2012 yes i can control so how to format a string? Quote Link to comment https://forums.phpfreaks.com/topic/263320-php-display-date-from-string/#findComment-1349478 Share on other sites More sharing options...
trq Posted May 29, 2012 Share Posted May 29, 2012 Take a look at the link I provided. Quote Link to comment https://forums.phpfreaks.com/topic/263320-php-display-date-from-string/#findComment-1349486 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.