the timestamp of mysql is only the date without any spacers. the php timestamp is a unix-timestamp (seconds since 01.01.1970) so you can´t convert your record-value to an normally date directly. you have to use split out the year, the month etc. manually. (or is there a function for it? don´t know)

Jan Pieper

So, you want the maximum date of the result set? Just use SQL:

select max(datecolumn) from table where (conditions);


On Monday 30 January 2006 1:03 pm, xkorakidis wrote:
hi guys!
I'm trying to manage a table containing a timestamp colum
- when I insert a record, I don't fill a value in timestamp column, so
current timestamp is inserted. The inserted value is smth like
- when I try to show this value in a php page, I use
date($varOfTimestampColumn) or getdate(). The final result is the
highest possible date (smth like January 19 2038 I think)

How can I manage the timestamp field so as to show the correct value?

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to