programguru Posted March 7, 2009 Share Posted March 7, 2009 Without writing a full blown explode() script, does anyone have any ideas as how to: Convert format: 03/05/2009 to Mar 5th, 2009 I tried several variations of date(), but think it's not a proper function for this conversion. Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/148318-solved-convert-format-03052009-to-mar-5th-2009/ Share on other sites More sharing options...
Maq Posted March 7, 2009 Share Posted March 7, 2009 $your_date = "03/05/2009"; $con = date("M jS, Y", strtotime($your_date)); echo $con; ?> Quote Link to comment https://forums.phpfreaks.com/topic/148318-solved-convert-format-03052009-to-mar-5th-2009/#findComment-778704 Share on other sites More sharing options...
programguru Posted March 7, 2009 Author Share Posted March 7, 2009 <?php $your_date = "03/05/2009"; $con = date("M jS, Y", strtotime($your_date)); echo $con; ?> Vedy nice. I did not know that function strtotime() existed!! Thanks for the tip. Quote Link to comment https://forums.phpfreaks.com/topic/148318-solved-convert-format-03052009-to-mar-5th-2009/#findComment-778705 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.