Skip to main content
andreammelde
Helper ⭐️⭐️
May 11, 2021 6:25 PM UTC
New Idea

Case Formula in data designer - allow date option

Related products:CS Rules Engine

Right now, you can use case formula for String, Number, and Boolean but it would be great to allow Date.

 

For example, I did a comparison between two date by subtracting them from each other to compare to columns of dates to determine which was the later date. In the next transform, I was to do a case where if DIFF is POSITIVE then select DATE 1 otherwise select DATE 2. This will allow me to do a comparison between two columns of dates

3 replies

Expert ⭐️
May 12, 2021 5:30 PM UTC

I would argue this enhancement is still needed.

 

If we had it, the solution would be one task with a case statement. What I proposed with the union will require an additional 3 unions/tasksminimum.

Translate
Contributor ⭐️⭐️⭐️
Mar 22, 2023 1:21 PM UTC

Running into the need for this. Upvoting!

Translate
jordan_cook
Contributor ⭐️⭐️⭐️⭐️⭐️
Mar 5, 2025 4:56 PM UTC

I just ran into this need the other day. My workaround was to convert dates to strings in one transformation, then do a case statement in a second transformation, and then parse back into a date in the a third transformation. Not pretty.

Translate