bindiya Posted April 8, 2011 Share Posted April 8, 2011 I have a php page where i need to list all item in a particular month.But the format for date stored is MMMM DD,yyyy that January 22, 2011. How do i extract the month name only from the above format Quote Link to comment https://forums.phpfreaks.com/topic/233051-extracting-month-where-the-date-is-like-january-21-2011/ Share on other sites More sharing options...
ShoeLace1291 Posted April 8, 2011 Share Posted April 8, 2011 $convert = strtotime($existing); $month = date('F', $convert); echo $month; Quote Link to comment https://forums.phpfreaks.com/topic/233051-extracting-month-where-the-date-is-like-january-21-2011/#findComment-1198586 Share on other sites More sharing options...
bindiya Posted April 8, 2011 Author Share Posted April 8, 2011 thank u it worked. Quote Link to comment https://forums.phpfreaks.com/topic/233051-extracting-month-where-the-date-is-like-january-21-2011/#findComment-1198594 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.