by alpha
8. May 2008 15:09
1. 当前系统日期、时间
select getdate()
2.
dateadd 在向指定日期加上一段时间的基础上,返回新的 datetime 值
例如:向日期加上2天
select
dateadd(day,2,'2004-10-15') --返回:2004-10-17 00:00:00.000
3. datediff 返回跨两个指定日期的日期和时间边界数。
select
datediff(day,'2004-09-01','2004-...
[More]
a27e9ebf-8140-4a77-978b-564025bed138|0|.0
Tags: 函数 Views:1193
SqlServer