最佳回答
1
snrtuemc Lv8 专家互助 发布于2024-6-18 10:11
你数据集sql用时间控件过滤数据
where 时间字段 between '${开始日期控件名}' and '${结束日期控件名}'
帆软用户r9BowM6DR7(提问者)
- 我是这样写的SELECT *
FROM test
WHERE 1=1
${if(len(edate)=0,"","AND dws_end_wticket_inc1.WO_SD_CA_DT = DATE_FORMAT(bdate, '%Y-%m-%d')")}
snrtuemc 回复 帆软用户r9BowM6DR7(提问者)
- SELECT * FROM test WHERE 1=1 ${if(len(edate)=0,"","AND dws_end_wticket_inc1.WO_SD_CA_DT = DATE_FORMAT("+bdate+", '%Y-%m-%d')")}
帆软用户r9BowM6DR7(提问者) 回复 snrtuemc
- 感谢大佬
取消
评论
最佳回答
1
很困想睡觉 Lv6 初级互助 发布于2024-6-18 10:21
帆软用户r9BowM6DR7(提问者)
- SELECT * FROM dws_end_wticket_inc1 WHERE 1=1
${if(len(edate)=0,"","AND dws_end_wticket_inc1.WO_SD_CA_DT >= DATE_FORMAT("+bdate+", '%Y-%m-%d')")}
${if(len(edate)=0,"","AND dws_end_wticket_inc1.WO_SD_CA_DT <= DATE_FORMAT("+edate+", '%Y-%m-%d')")}
取消
评论
最佳回答
0
CD20160914 Lv8 专家互助 发布于2024-6-18 10:11