Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Unexpected datetime >= evaluation by Alteryx

Diederik_vanderharst
8 - Asteroid

We are using a generate rows to create a month scaffold between this month (including this month) and the last month of the next year, august 2024 up and including to december 2025.

NB: Today is 2024-08-21
When the following config is used somehow the Condition Expression is met until 2024-09-(21) but the row for 2024-08-21 is not generated, which we would expect. YearMonth(2024-08-21) >= 2024-08-21 (DatetimeNow()) = TRUE is it not?

I'm puzzled, as is my colleague. We can get to the desired outcome, but we wonder what part of the Alteryx Logic we are missing that results in this behaviour.

Scherm­afbeelding 2024-08-21 om 11.59.12.png

Those who suspect the addition of 6 hours might complicate things, here's the outcome of a simplified effort:

Scherm­afbeelding 2024-08-21 om 12.08.36.png


Love to hear your answers!

3 REPLIES 3
ChrisTX
15 - Aurora

Use the ToDate function in your Condition Expression

 

In your current Condition Expression you're comparing a Date to a DateTime. My guess is that 

the Date value 2024-08-21 is NOT >= a DateTime value like 2024-08-21 10:42:08

 

Screenshot 2024-08-21 053653.png

Chris

Raj
16 - Nebula

@Diederik_vanderharst 
find the workflow attached
mark done if solved.

Diederik_vanderharst
8 - Asteroid

Thanks @ChrisTX and @Raj for contributing. todate() fixed the issue and also explained the behaviour.

Labels