> Change your query: > select dayofmonth(Posted) as DOM_Posted, > month(Posted) as M_Posted, > year(Posted)as Y_Posted, > hour(Posted) as HH_Posted, > minute(Posted) as MM_Posted, > Name, > Prayer > from prayer > > Then access the access the fields by the name (DOM_Posted). > $recSet = mysql_query($query); > $row = mysql_fetch_assoc($recSet); > Access individual field: > $row['DOM_Posted']; > $row['M_Posted']; > etc.... > > OR > Use the php date (Don't know - haven't tried) functions to parse the > required values out of the Posted field.
Or you can use the DATE_FORMAT() function in your query. SELECT DATE_FORMAT(Posted,'%m/%d/%Y') as F_Posted FROM Prayer Then you can echo $row['F_Posted'] and it'll already be in the correct format. Check the manual for the correct usage of DATE_FORMAT() (The MySQL manual.) ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php