them damn pesky dates that i hates
Posted: Wed Jun 04, 2003 2:44 am
Trying to display the day of the week for every date record i pull from a table. Have tried all sort's but have ended up with the below examples. The first one is the one i would have my money on, but they both keep giving me thursday!! Any idea's
mod_edit: added
Code: Select all
<?PHP
//1.
$TheDay = gmdate("l",$row["BookedDate"] );
//2.
$Break = '-';
$DateArray1 = array_reverse(explode('/',$row["BookedDate"]));
$ReturnDate1 = implode($Break, $DateArray1);
$TheDay = gmdate("l",$ReturnDate1);
//3.
$DateArray1 = array(explode('/',$row["BookedDate"]));
$ReturnDate1 = implode("",$DateArray1);
$TheDay = gmdate("l",$ReturnDate1);Code: Select all
tags (and comment signs)[/size]