請教下各位老師,要用資料集引數刷選出某個時間段的資料,寫的sql是這樣的select * from cxhnweixin.FPV_FARM_PAY_VOUCHER
where status ='finish'
${if(len(starttime)=0,""," and finish_time>='"+starttime+"'")}
${if(len(endtime)=0,""," and finish_time<'"+endtime+"'")}
但是設定引數后顯示文字與格式字串不匹配,看了下資料,里面的finish_time格式是yyyy-MM-dd HH-mm-ss,我估計是我時間格式沒設定好,但是又不知道怎么設定,來請教下各位老師
(純新人自己看教程摸索,無人教,小白地方請見諒)
uj5u.com熱心網友回復:
表里面是有很多時間資料,要求是以兩個時間作為引數,通過控制元件修改這兩個時間來顯示出這兩個時間之間的資料uj5u.com熱心網友回復:
已解決select * from cxhnweixin.FPV_FARM_PAY_VOUCHER
where status ='finish'
and finish_time >= cast(to_date('${starttime}','yyyy-mm-dd hh24:mi:ss') as timestamp)
and finish_time < cast(to_date('${endtime}','yyyy-mm-dd hh24:mi:ss') as timestamp)
order by finish_time
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/8419.html
標籤:基礎類
下一篇:csdn又抽風了?
