开发者社区 问答 正文

sql时间筛选的问题。我想按月筛选,除了where [登记日期] between 以外其他方法?

登记日期是年月日的格式,有没有[登记日期]的month属性判断是1月还是其他月?

展开
收起
吴孟桥 2016-06-16 18:03:24 2853 分享 版权
1 条回答
写回答
取消 提交回答
  • where datepart(year,字段) = 2016 and datepart(month,字段) = 1

    2019-07-17 19:41:41
    赞同 展开评论
问答分类:
SQL
问答地址: