liye

liye

博客园 首页 新随笔 联系 订阅 管理

2010年8月14日 #

摘要: select convert(varchar(100),getdate(),101)--01/08/2008 select convert(varchar(100),getdate(),102)--2008.01.08 select convert(varchar(100),getdate(),103)--08/01/2008 select convert(varchar(100),getdate... 阅读全文
posted @ 2010-08-14 10:54 晔 阅读(2693) 评论(0) 推荐(1) 编辑

摘要: Sql时间函数 一、sqlserver日期时间函数SqlServer中的日期与时间函数1.当前系统日期、时间selectgetdate()2.dateadd在向指定日期加上一段时间的基础上,返回新的datetime值例如:向日期加上2天selectdateadd(day,2,'2004-10-15')--返回:2004-10-1700:00:00.0003.datediff返回跨两个指定... 阅读全文
posted @ 2010-08-14 10:38 晔 阅读(353) 评论(0) 推荐(0) 编辑