From: "Paul DuBois"> At 22:27 +0200 5/16/04, John Fawcett wrote: > >Year does not operate on a unix timestamp. > > Sure it does: > > mysql> select t, year(t) from tsdemo1; > +----------------+---------+ > | t | year(t) | > +----------------+---------+ > | 20010822133241 | 2001 | > | 20010822133241 | 2001 | > +----------------+---------+ > > The problem lies elsewhere. Where that might be is difficult to > say, because no PHP code has been shown yet. > The first column doesn't look like a unix timestamp. It should be expressed in seconds since 1970-01-01 00:00:00 GMT.
Try this to get the unix timestamp of the above date. Year shouldn't work on it. SELECT UNIX_TIMESTAMP('2001-08-22 13:32:41'); John -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]