problem was solved by using substr() on the timestamp -- www.phpexpert.org/truefaith.htm "True Faith is not just when you believe in God and yourself, it is when others begin to believe in you as well" - Damian John Paul Brown 2004 "Damian Brown" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thank Yoy Ryan > > I had thought the same, but I didn't know how to go about it > I did not know of the substr function > it is now outputting as follows > > 10 04 2004 - 21:23:50 > > Thanks once again, I am sure I will be asking for more help soon > I tend to dive in at the deep end and never learn the basics > -- > www.phpexpert.org/truefaith.htm > "True Faith is not just when you believe in God and yourself, it is when > others begin to believe in you as well" - Damian John Paul Brown 2004 > "Ryan A" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > > 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