Converting date format
Posted by mkhairul - May 19, 2009 at 04:05:48 pm - No CommentsCategories: code, php
I don’t know what its called, but here, we use dd-mm-yyyy, meanwhile in php you can’t convert that date into a unix timestamp using strtotime. So I have to convert it to a US date format (mm-dd-yyyy).
// Convert date format from dd-mm-yy to mm-dd-yy
function convert_date_format($date)
{
return implode('-', array_reverse(split('/', $date)));
}
No Comments yet »
RSS feed for comments on this post. TrackBack URI
Leave a comment
GimpStyle Theme design by Horacio Bella.
