运维网's Archiver
论坛
›
SQL Server
› sql server 2008 时间操作函数
q3256
发表于 2016-11-2 08:44:00
sql server 2008 时间操作函数
1 select DATEDIFF(DAY,2010-01-06,2010-01-03)
输出结果 3
2select GETDATE()
输出结果 2011-02-28 14:57:45.137 即为当前的时间
3select year('2010-02-01')
输出结果 2010
页:
[1]
查看完整版本:
sql server 2008 时间操作函数