Mysql中的from_unixtime,unix_timestamp 整型与datetime 字符串之间的转换

select from_unixtime(lasttalktime),lasttalktime  from im_ims_friend 

select unix_timestamp('2013-10-13')

select count(*) from im_ims_friend where lasttalktime>unix_timestamp('2013-10-13')

select count(*) from im_ims_friend_copy where lasttalktime>unix_timestamp('2013-10-28') and userid=6736359

INSERT INTO im_ims_friend  SELECT *  FROM  im_ims_friend_copy where lasttalktime>unix_timestamp('2013-10-20')

delete  FROM  im_ims_friend where lasttalktime>unix_timestamp('2013-10-20')  and lasttalktime<unix_timestamp('2013-10-23') 


select from_unixtime(1210003200) datetime

你可能感兴趣的:(Mysql中的from_unixtime,unix_timestamp 整型与datetime 字符串之间的转换)