Alteryx Designer Desktop Discussions

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

Help With Error: Parse Error at char(19): Invalid type in operator >. (Expression #2)

Leanna12
7 - Meteor

Help With Error: Parse Error at char(19): Invalid type in operator >. (Expression #2)

 

Here is the Syntax...

DateTimeDiff([Column 1 Date],[Column 2 Date],"days")

 

Any ideas how to troubleshoot this?

4 REPLIES 4
BS_THE_ANALYST
14 - Magnetar

@Leanna12 Check [Column 1 Date] or [Column 2 Date]. One of them isn't formatted as a Date. You need to convert one of those (or both if neither are formatted as a date) using the DateTime tool:

BS_THE_ANALYST_0-1678125463006.png

 

 

alexnajm
17 - Castor
17 - Castor

Based on the error, either one of your [Date] fields is not being stored as a Date data type!

Leanna12
7 - Meteor

Thanks for this! Do you have some recommended solutions to correct the date format?

BS_THE_ANALYST
14 - Magnetar

@Leanna12 depends on how the date actually looks. As I previously mentioned, I would use the DateTime tool. 

 

Open the tool palette, select the DateTime tool, you can find this in the Parse section.

BS_THE_ANALYST_1-1678127065183.png

 


Click on Open Example, this page pops up:

BS_THE_ANALYST_2-1678127109957.png

 

Run the workflow, then move down to example convert a String to a Date:

BS_THE_ANALYST_3-1678127216633.png

You can see how they converted the DOB column from a string to a Date (see the DOB_New column on the end). 

If your date matches none of the presets, check the Convert a Custom Formatted String to a Date example which is further down the example page.




 

Labels