i just want to convert 2007-04-09 as 09-April-2007. how to do this?? thanx in advance.
I have one way how to do it, its long but for me it works ;)
i hope it will work for u!
input is 2007-04-09 and output is 09-April-2007
php code is [php]<?php
$date = "2007-04-09";
$explodedate = explode("-", $date);
$year = $explodedate[0];
$month = $explodedate[1];
$day = $explodedate[2];
if ($month == 01) { $month1 = 'Jan'; }
if ($month == 02) { $month1 = 'Feb'; }
if ($month == 03) { $month1 = 'Mar'; }
if ($month == 04) { $month1 = 'April'; }
if ($month == 05) { $month1 = 'may'; }
if ($month == 06) { $month1 = 'Jun'; }
if ($month == 07) { $month1 = 'Jul'; }
if ($month == 08) { $month1 = 'Aug'; }
if ($month == 09) { $month1 = 'Sep'; }
if ($month == 10) { $month1 = 'Oct'; }
if ($month == 11) { $month1 = 'Nov'; }
if ($month == 12) { $month1 = 'Dec'; }
echo $day."-".$month1."-".$year;
?>[/php]
Please encode any code within the appropriate code tags, See the Posting guidelines before you continue posting in this forum - moderator