你的描述我可能没看懂,不知道是不是你想要的,假如数据集中有两个日期参数starTime和endTime,日期字段是productTime,且格式相同、数据类型相同,那在数据集中的写法有两种:
1、where 1=1 and productTime between '$starTime' and '$endTime'
2、${if(len(startTime)==0,"","and productTime >='"+startTime+"'")}
${if(len(endTime)==0,"","and productTime <'"+endTime+"'")}
还有其他的,可以文件-输出-模板(内置数据集),然后说下具体需求