My original query worked perfectly via SQL Developer:

select * from [table] where DT_CURRENT_DT = '15-OCT-18'

However when ran via freehand SQL in SAP BO I got no results. After running the query with no conditions I noticed that BO re-formats the date to 10/15/18

1 Answer 1


to_date function solved the issue and now the condition is recognized by BO's freehand SQL.

DT_CURRENT_DT = to_date('10/15/18', 'MM/DD/YY')

  • 1
    Better use to_date('10/15/18', 'MM/DD/RR') or much better to_date('10/15/2018', 'MM/DD/YYYY') - did you never hear about the Y2K-Problem? - (I see I am getting old. Nowadays developers were still young kids when the Y2K topic was all over in the news) Nov 16, 2018 at 17:51
  • 1
    Always use 4-digit years. The 'RR' trick is a band-aid fix for the Y2K problem. If you read the Oracle documentation, The answer can change at the year 2050. Nov 18, 2018 at 23:36
  • I prefer standard ISO date literal: date '2018-15-10'
    – user1822
    Jan 20, 2022 at 19:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.