SQL SERVER中关于日期时间的函数
2007-06-20 10:20
330 查看
获取月份:select * from table where month(column) =month(getdate())
或者select * from table where convert(varchar(1),column,10)= convert(varchar(1),getdate(),10)
获取年份函数:yaer( getdate() )
获取N年(日,月)前(后)的年份select adddate(yy,N,getdate() )
或者select * from table where convert(varchar(1),column,10)= convert(varchar(1),getdate(),10)
获取年份函数:yaer( getdate() )
获取N年(日,月)前(后)的年份select adddate(yy,N,getdate() )
相关文章推荐
- java中关于时间日期操作的常用函数(转摘)
- SQL Server 日期和时间函数
- SQL Server之日期和时间函数
- SQL Server 日期和时间函数
- java中关于时间日期操作的常用函数
- SQL Server 日期和时间函数
- java中关于时间日期操作的常用函数
- MySQL中关于日期、时间的数据类型和函数
- java中关于时间日期操作的常用函数
- SQL Server 日期和时间函数
- Sql Server 2008 日期和时间函数、数学函数、字符传函数小结
- SQL Server 日期和时间函数
- java中关于时间日期操作的常用函数
- SQL Server返回当前实例系统日期和时间的函数
- java中关于时间日期操作的常用函数
- java中关于时间日期操作的常用函数
- SQL Server 日期和时间函数
- sql server日期时间(datetime)函数
- sql server 借用函数处理一些关于时间的实用例子
- java中关于时间日期操作的常用函数