Free Trial

Alteryx Designer Desktop Discussions

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

Update date using Date Tool

NidhiAg
7 - Meteor

I am trying to something really simple. I have a date column and I am trying to replace is dynamically using Date and action tool. But I am getting error Formula (9): The formula "Date" resulted in a number but the field is a Date/Time. (Expression #1)
  

NidhiAg_0-1621543854790.png

 

What am i doing wrong

4 REPLIES 4
Emil_Kos
17 - Castor
17 - Castor

@NidhiAg wrote:

I am trying to something really simple. I have a date column and I am trying to replace is dynamically using Date and action tool. But I am getting error Formula (9): The formula "Date" resulted in a number but the field is a Date/Time. (Expression #1)
  

NidhiAg_0-1621543854790.png

 

What am i doing wrong


Can you Check If your date formula is working correctly? It seems that you got an error on it. Check the data type od this column as it seems that is the issue.

Maskell_Rascal
13 - Pulsar

Hey @NidhiAg 

 

So the problem actually has to do with how the formula tool reads dates. 

Maskell_Rascal_0-1621545358063.png

 

To add a date manually in the Formula tool, we have to treat it like a string with using quotes with the data type set to Date. 

Maskell_Rascal_1-1621545457578.png

 

What happens when you use the Date interface tool is that the system treats your selection as a string/numeric value being transferred into the Formula tool. 

 

There are numerous ways to fix this, but the simplest way is to hard code a date into your Formula date field like this:

Maskell_Rascal_2-1621545625332.png

 

Then configure your Action tool like this:

Maskell_Rascal_3-1621545653554.png

 

I've attached an analytic app that has a three different methods for you to try out. 

 

Let me know if any of these work for you. 

 

Thanks!

Phil

 

NidhiAg
7 - Meteor

 Thank you so much it works perfect...

yhct1lg
5 - Atom

I'm facing the same error even after changing it to the string like suggested. Could you help me out? 
Using Date Tool on a simple workflow - Alteryx Community

Labels
Top Solution Authors