On 4/11/2004 3:25:09 AM, Damian Brown ([EMAIL PROTECTED]) wrote: > I need to output a date and time that shows more clearly than just > outputting the timestamp > > what is the correct way to go about it ? > I have looked at getdate(), but I haven't fathomed it out yet !
If you are using timestamp(14), here is how i do it: (after the select) if(($row = mysql_fetch_row($result))>=1) { $d_year = substr($row[4],0,4); $d_month = substr($row[4],4,2); $d_day = substr($row[4],6,2); $d_hours = substr($row[4],8,2); $d_mins = substr($row[4],10,2); $d_secs = substr($row[4],12,2); } I am using a mysql_fetch_row as i am getting a lot of fields from the db, you may want to use the fetch_array or something else but eh above should give you an idea. The reason I like it like this is because the year,month,date etc is all in different varialbes which I can format the way I want it...or can even give the client the option of specifying the format...but thats another thing altogether.... HTH. Cheers, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php