如题,在SQL Server 2005  datetime 使用getdate()时默认日期格式是显示 年月日 时分秒 毫秒,如果读取数据时只想使用年月日是可以截取的。用到了convert这个函数,如select convert(varchar(10),getdate(),120)  ,结果为:2010-05-13。转换成功。。。在此小记,以备日后使用