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

来源:互联网 发布:音轨软件 编辑:程序博客网 时间:2024/06/09 15:51
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