What are the challenges you face when working across database platforms? Take the survey
Options

How to convert date format in order my condition w calculating work?

I am trying to submit the following condition that dte_received is supposed to be between sysdate and the date 12 months back. Therefore I submitted the following statement but failed

where dte_received BETWEEN SYSDATE AND add_months(sysdate,-12)

I took the following steps:

1. select SYSYDATE FROM duals (-> sysdate looks like 5/7/2018 12:02:11 pm

2. select dte_received  FROM mytable (->  dte_received looks like 19981213)

How should i convert it in order my condition date formats match and statement work?

Thank you in advance!

Rina Green






Sign In or Register to comment.