可以在显示的时候定义格式这样:select convert(char(10),getdate(),120)
或者
select convert(char(8),getdate(),112)