In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Replace a DateTime with String in Action Tool

hlau117
6 - Meteoroid

I have a formula tool that calculates by default the first monday of the week. I also have a text box tool that allows the user to override the formula tool date by inputting their date of their choice. I am using an update value with formula

that says if the text date is empty, then use the default date from the formula tool otherwise, use the input date.

 

However, I am not able to get the updated date reflected by the manual text input. Attached is the workflow

2 REPLIES 2
fmvizcaino
17 - Castor
17 - Castor

Hi @hlau117 ,

 

In your replace function, you need to use quotes in your second parameter and also, since your user is passing a date, you need to guarantee that you will have your date surronded by quotes.

I standardized your formula using double quotes in all formulas to use ' as the second parameter delimiter.

 

IF isEmpty([#1]) THEN '1' ELSE REPLACE([Destination],'DateTimeFormat(DATETIMEADD(DateTimeToday(),- IF TONUMBER(DATETIMEFORMAT(DateTimeToday(),"%w"))=0 THEN 7 ELSE TONUMBER(DATETIMEFORMAT(DateTimeToday(),"%w"))ENDIF +1,"days"),"%m-%d-%Y")', "'"+[#1]+"'") ENDIF

 

Best,

Fernando Vizcaino

hlau117
6 - Meteoroid

@

 

Labels
Top Solution Authors