This function will fix your date display. 
$sqldate= fixdate($sqldate); 

function fixdate($data){
 for($i=0; $i<strlen($data); $i++) {
  if($i<=3) {
  if($i==4 or $i==5) {
  if($i==6 or $i==7) {
 $mdate= $aux[1]."/".$aux[2]."/".$aux[0];
 if(checkdate($aux[1], $aux[2], $aux[0])) {
  Return $mdate;
 else {
  Return "ERROR";

  fabrizio <[EMAIL PROTECTED]> wrote: Hello dear all, 

in my mysql-db I have a date_tbl with this format: (20020531).
how is possible in PHP do display date_tbl's values in a more human-readable 
format like 05-31-2002 or 31/05/2002 ?

thaks in advance, 


PHP Database Mailing List (
To unsubscribe, visit:

~ Manuel Ochoa ~
Seven days is too long to wait for a gun!

Do You Yahoo!?
Sign-up for Video Highlights of 2002 FIFA World Cup

Reply via email to