0
|
404177716发布于2016-4-21 18:31(编辑于 2023-9-6 09:34)
|
555
|
-
ajian(提问者)
我写了两个公式如下:importdate为数据库的日期,$rpdate为参数。
importdate>=IF(DAY($rpdate)>0&&DAY($rpdate)<=10,DATE(YEAR($rpdate),MONTH($rpdate),1),IF(DAY($rpdate)>10&&DAY($rpdate)<=20,DATE(YEAR($rpdate),MONTH($rpdate),11),DATE(YEAR($rpdate),MONTH($rpdate),21)))
importdate<=IF(DAY($rpdate)>0&&DAY($rpdate)<=10,DATE(YEAR($rpdate),MONTH($rpdate),10),IF(DAY($rpdate)>10&&DAY($rpdate)<=20,DATE(YEAR($rpdate),MONTH($rpdate),20),DATE(YEAR($rpdate),MONTH($rpdate),31)))
这个31比较讨厌,如果是2016-02-31 就变成了2016-03-02了
|
|