0

I am working on a custom SQL query in Tableau Prep using an Oracle data source. I usually write my SQL in another platoform, and am having trouble finding the right exact date syntax.

What is the correct syntax for the example below?

and (invc_date > {ts'2022-12-31 00:00:00'}    
or drft_date > {ts'2022-12-31 00:00:00'} 
or drft_date is null)

1 Answers1

0

You need to use TO_DATE function to convert a string to a date value

TO_DATE('2022-12-31 23:59:59', 'yyyy-mm-dd hh24:mi:ss')
Abdulmajeed
  • 1,502
  • 2
  • 10
  • 13