
November 1st, 1999, 08:50 PM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
First chop the MySQL date up into three variables - $year, $month and $day.
Then use a combination of the mktime() and date() commands. Mktime can turn $month/$day/$year into a Unix timestamp and then date() turns the timestamp into a string formatted however you like. For example:
$weekday = date("l", mktime(0,0,0,$month,$day,$year));
$print ($weekday);
Will print out the day of the week spelled in full.
Check the manual for details on the date and mktime functions.
|