Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Create a new date field based on a formula

treehook
7 - Meteor

Hello, I've got a flow that has a hardcoded date called UserEnteredDate (2015-10-15). I'd like make this an app by adding a user input date which will update the formula tool to replace this hardcoded date. here's what i've done:

1. Added Date Interface tool to accept date (works fine)

2. Added Action Interface tool to alter the date (settings update @expression - value=" '2015-10-15' ") this is the part that errors out - i get: Formula (112): The formula "UserEnteredDate" resulted resulted in a number but the field is a Date/Time (Expression #1).

 

I'm rather new to Alteryx so i apologize if this is a basic question but would greatly appreciate any help from the experts on this board.

 

Thanks!

2 REPLIES 2
JordanB
Alteryx
Alteryx

Hi @treehook

 

You were very close! So when you add the action tool you will need to click the 'Replace a specific string' tick box at the bottom of the configuration window. This will allow you to edit the text. 

 

Before: "2015-01-01"

After: 2015-01-01

 

You will need to delete the quotation marks and this is what the date interface tool will add in and replace. The quotation marks will stay in the formula tool but your user date  input will just replace the date string and not the quotation marks. 

 

10-10-2016 3-05-37 PM.png

 

Workflow also attached in case you have any questions :)

 

Best,

 

Jordan Barker

Solutions Consultant 

treehook
7 - Meteor

Worked perfectly! Thanks Jordan!

Labels
Top Solution Authors