摘要: 问题的出现:数据库中日期存放格式包含时间;有时候只需要日期不要时间解决:QL语句截取时间,只显示年月日(2004-09-12)select CONVERT(varchar, 字段名, 120 )eg:select convert(varchar(11),vc_createdate,120) '日期' from table扩展:其他格式select CONVERT(varchar(12) , getdate(), 111 )2004/09/12select CONVERT(varchar(12) , getdate(), 112 )20040912select CONVERT(v 阅读全文
posted @ 2012-11-26 17:45 小凤梨子 阅读(969) 评论(0) 推荐(0) 编辑