一、CONVERT(char(8),getdate() , 112)
显示:20160101
实例:select * from login_record where CONVERT(char(8),login_time , 112)>='20160501' and CONVERT(char(8),login_time , 112)<='20160630'
一、CONVERT(char(8),getdate() , 112)
显示:20160101
实例:select * from login_record where CONVERT(char(8),login_time , 112)>='20160501' and CONVERT(char(8),login_time , 112)<='20160630'