posts - 7, comments - 4, trackbacks - 0, articles - 3
  IT博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

一些日期函数

Posted on 2007-10-15 11:44 宇宙浪子 阅读(239) 评论(1)  编辑 收藏 引用
datepart(hour,getdate())取时
datepart(minute,getdate())取分
datepart(second,getdate())取秒
年 year(getdate())
月 month(getdate())
日 day(getdate())

Feedback

# re: 一些日期函数  回复  更多评论   

2007-10-15 21:14 by 宋培豹
datepart返回的是int型,还有其他的,比如,datename返回字符串datename(dw,getdate)另外还有dateadd,datediff
只有注册用户登录后才能发表评论。