当前位置: 代码迷 >> SQL >> sql 获取年月日礼拜周数时分秒
  详细解决方案

sql 获取年月日礼拜周数时分秒

热度:74   发布时间:2016-05-05 14:28:55.0
sql 获取年月日星期周数时分秒

?select GETDATE() as '当前日期',
DateName(year,GetDate()) as '年',
DateName(month,GetDate()) as '月',
DateName(day,GetDate()) as '日',
DateName(dw,GetDate()) as '星期',
DateName(week,GetDate()) as '周数',
DateName(hour,GetDate()) as '时',
DateName(minute,GetDate()) as '分',
DateName(second,GetDate()) as '秒'

结果:

2009-08-13 23:07:15.403 2009 08 13 星期四 33 23 7 15

  相关解决方案