Alteryx Designer Desktop Discussions

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

Updating a DateTimeAdd String with an Action Tool

AndyLeS
5 - Atom

Hi All

 

I'm fairly new to Alteryx so forgive me if my query is rather dumb.

 

I'm trying to update a date filter using an Action tool so that it sets my input data to one day more than the accounting year end selected in an Interface Date select tool (so if I select 31 December 2019 in the Date tool, the filter updates to 1 January 2020).

 

I'm using the filter formula [Date] <= DateTimeAdd("2019-12-31", +1, days") but am getting the following App error message:

 

Filter (1040): Parse Error at char(11): Argument 1 of DATETIMEADD is not a string.

 

In the Update tool, I'm selecting the Replace a Specific String option and using the date as the element of the string to update - I get the same error message if I use quotation marks or not.

 

AndyLeS_0-1635786007835.png

 

I'm suspecting that this has something to do with the fact that a date cannot form part of a string but I need the date output from the filter to remain as a Date.

 

Grateful for any pointers!

 

Many thanks!

2 REPLIES 2
FláviaB
Alteryx Community Team
Alteryx Community Team

Hi @AndyLeS. There is no such thing as a dumb question. We are all learning and the Community is here to help. The only thing is that here (the Introduce Yourself board) is not the best place to get a proper support. So I am moving your post to our Designer Discussions board for more visibility. 

 

Flávia Brancato
HomesickSurfer
12 - Quasar

Hi @AndyLeS 

 

[Date] <= DateTimeAdd("2020-12-31", +1, "days")

 

Using the above in the filter tool works for me.

 

Capture.PNG

Labels