View Single Post

  #1 (permalink)  
Old 02-28-2008
howa
 
Posts: n/a
Default Why TimeStamp was truncated?

CREATE TABLE `table1` (
`ts` TIMESTAMP NOT NULL
) ENGINE = innodb;

INSERT INTO `table1` (`ts`) VALUES ('1202832067');
INSERT INTO `table1` (`ts`) VALUES ( UNIX_TIMESTAMP('1202832067') );

The table result is storing "0000-00-00 00:00:00" for both queries,
any idea?

Reply With Quote