About orcale database, the field format of time 00:00:00, the time of addition and subtraction method yyyy-mm-dd

select * from t_xxtx t 
where (to_date(t.xxtx_endtime,'yyyy-mm-dd hh24:mi:ss')-sysdate)>1 
and (to_date(t.xxtx_endtime,'yyyy-mm-dd hh24:mi:ss')-sysdate)<2;

The scenario is:
field style is varchar2 time of type String, Date: 2019-05-29 16:00:30,
to find out the content from the system time of the day (a little flaw, not so precise)
had wanted to use the time stamp, but the front desk more intractable, relatively speaking processed on sql is the most convenient

Guess you like

Origin blog.csdn.net/nuoyuezuo/article/details/90641203