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? 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; ?> 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. 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
Archived
This topic is now archived and is closed to further replies.