Oracle comparing timestamp with date

后端 未结 3 654
抹茶落季
抹茶落季 2020-12-29 03:31

I have a timestamp field and I just want to compare the date part of it in my query in Oracle

How do I do that,

SELECT *
FROM Table1
WHERE date(field         


        
3条回答
  •  南方客
    南方客 (楼主)
    2020-12-29 04:28

    to_date format worked for me. Please consider the date formats: MON-, MM, ., -.

    t.start_date >= to_date('14.11.2016 04:01:39', 'DD.MM.YYYY HH24:MI:SS')
    t.start_date <=to_date('14.11.2016 04:10:07', 'DD.MM.YYYY HH24:MI:SS')
    

提交回复
热议问题