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

Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.

Error: The formula "Date" resulted in a integer but the field is a Date/Time

dmpope
8 - Asteroid

Hi everyone,

 

I have a formula that creates a date column in my workflow. This needs to be updated with a selected date via the Date interface tool on each run. 

 

The image won't upload, but I have the formula tool configured:

 

Output Column: Date

Formula: "2023-06-09"

Data Type: Date

 

And the Action tool:

 

Update Value (Default)

FormulaField - (at symbol)expression -value="2023-06-09"

Replace a Specific String is selected.

 

The way I have this set up works when I test it out with the interface on desktop designer but once I get it into Server it's giving me the error: The formula "Date" resulted in a integer but the field is a Date/Time. 

 

I'm not really sure what I need to alter to get this to work properly within Server?

 

Thank you

 

Edit to add: I've also tried changing the data type to Int64 and removing the quotations and it only returns the number 2008 in the Date field. 

1 REPLY 1
SPetrie
13 - Pulsar

In your Replace a specific string, do you have "2023-06-09" or is it 2023-06-09?

You want it to be the latter with no quotes. If you replace "2023-06-09", the quotes are also being replaced and you are just putting a raw number/date in it. Removing the quotes from the Replace a specific string will leave them in the original formula tool so the new date will be encapsulated in quotes, which is required for the formula tool to properly format the date.