Yeh, ive allready looked at that before, but where and when do i use DATE_FORMAT() ? When im inserting the row or selecting it?
"Jome" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Hi, im making a tab/lyric portal, and for viewing tabs i want to display > the > > time the lyric/tab was submitted. So I retrive it from a MySQL database > (as > > a timestamp) and format it using the date function. The problem is, that > the > > date: 19-01-2038 04:14:07 is allways returned, even though in the `date` > > field the timestamp says (as an actual example) 20020723200919. > > > > Here is a shortened version of the script: > > > > <?php $submitdate = date("d-m-Y H:i:s", $values[4]); echo("Submitted on > > $submitdate"); ?> > > > > Hi Tony, > > the date() function in PHP does _only_ take UNIX timestamps as an argument > which means that you can not run such a timestamp as the above. > > I recommend that you have a look at > http://www.mysql.com/doc/D/a/Date_and_time_functions.html which describes > the built-in functions for date-handling in MySQL. A function to look at > could be DATE_FORMAT(). > > Regards, > > Jome > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php