$date = 30/12/1956;
 $month = Array(1=>'Jan', 2=>'Feb', .... 12->'Dec');
 // The array of month... 

 function date_format($date) {
  Global $month;
  $date = explode('/', $date);
    // And it became to you an array...
  return $date[0].'-'.$month[$date[1]].'-'.$date[2];
 }
 //will return 30-Dec-1956

Cheers,
Maxim Maletsky


-----Original Message-----
From: Niel Zeeman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 16, 2001 2:46 PM
To: php gen list
Subject: [PHP] HELP! Date formatting


Hi

Ive gotto format a date such as 30/12/1956 to format 30-Dec-1956,
I can not use mktime cause that only provides the timestamp from 1970.
Is there any other method of getting this right.

thnx
Niel Zeeman
Tel(W): (043)7014247
Cell: 082 651 4083
eMail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to