Is there a way to convert a date such as 022703 to Thursday February 27, 2003 ?
I could always modify the date to but I want something simple with just numbers and maybe slashes "/"
$var = 022703 $day = substr($var, 0, 2); $month = substr($var, 2, 2); $year = substr($var, 4, 2); $format = mktime(0, 0, 0, $month, $day, $year); $formatted = date("D M d Y",$format);
hows that?
Ant
oops sorry wrong format:
$var = 022703 $month = substr($var, 0, 2); $day = substr($var, 2, 2); $year = substr($var, 4, 2); $format = mktime(0, 0, 0, $month, $day, $year); $formatted = date("D M d Y",$format);
Thanks anthill, that should work unfortunatly I am having problem with a different part of my script so I cannot test it yet.