【发布时间】:2018-12-24 22:30:22
【问题描述】:
如何从这个查询中选择日期范围?
例如:从 Month('2017-05-22') 和 Year(date1) = Year('2017-05-22') to Month('2018-05-22') 和 Year(date1) = Year('2018-05-22')
我当前的查询:
SELECT
date1
FROM
data
WHERE
Month(date1) = Month('2018-05-22') And Year(date1) = Year('2018-05-22')
【问题讨论】:
-
分享您的样本数据和预期输出