Skip to main content
Question

I want to check if the delivery date is less or equal to today's date + 42 days - WHEN TO_DATE("EKES"."EINDT", FORMAT ('%d-%m-%Y)) <= ADD_DAYS(TO_DATE(TODAY(), FORMAT('%d-%m-%Y)), 42) THEN 'Relevant' ELSE NULL END // There is always a syntax

  • Nov 15, 2023 10:36 AM UTC
  • 1 reply
  • 77 views

julia.bauer
Level 9
Forum|alt.badge.img+6
I want to check if the delivery date is less or equal to today's date + 42 days - WHEN TO_DATE("EKES"."EINDT", FORMAT ('%d-%m-%Y)) <= ADD_DAYS(TO_DATE(TODAY(), FORMAT('%d-%m-%Y)), 42) THEN 'Relevant' ELSE NULL END // There is always a syntax error.

1 reply

  • Nov 15, 2023 12:39 PM UTC

https://docs.celonis.com/en/add_days.html

 

CASE WHEN "EKES"."EINDT" <= ADD_DAYS(TODAY(),42) THEN 'Relevant' ELSE NULL END

 

From your query, the syntax error seems to come from the FORMAT() function, you do not seem to be closing the quotation " ' ".