jasonc Posted September 24, 2010 Share Posted September 24, 2010 I wish to know how i can convert this date 24-09-2010 to this format 2010-09-24 Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted September 24, 2010 Share Posted September 24, 2010 I would use the explode and list functions: <?php $old_date = '24-09-2010'; list($d,$m,$y) = explode('-',$old_date); $new_date = "$y-$m-$d"; echo $new_date; ?> Ken Quote Link to comment Share on other sites More sharing options...
jasonc Posted September 24, 2010 Author Share Posted September 24, 2010 great thank you 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.