Alteryx Designer Discussions

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

Null values when using DateTimeAdd function are not correct

jjenny50
7 - Meteor

I have a workflow that I used the DateTimeAdd fuction, because when coming into Alteryx it was coming up as 44183.563345 etc.  

I used DateTimeAdd('1900-01-01',[INITIATIVE_DUE_DATE] - 2 ,'days') and it works great, except for the null values in my original data set are now coming back 1900-01-01.  I tried to use the data cleansing tool to have those null fields blank, but it does not work. 

 

 

 

jjenny50_0-1634909466810.png

 

0

14 REPLIES 14
atcodedog05
21 - Polaris

Hi @jjenny50 

 

In the data you have provided INITIATIVE_DUE_DATE is totally null. Can you take a look and let me know.

jjenny50
7 - Meteor

I am sorry. I must have deleted that column as well.  please see new sample file attached. Thank you for your help!

HomesickSurfer
12 - Quasar

Hi @jjenny50 

 

Since you are successfully converting to proper dates for the non-Null values, try this on the DUE DATE field:

 

ToString(Replace([DUE DATE], '1900-01-01', ""), 0)
jjenny50
7 - Meteor

That worked. Those fields are now blank. Thank you!  

atcodedog05
21 - Polaris

Hi @jjenny50 

 

ToDate() is also working for me on your input excel.

 

Workflow:

atcodedog05_0-1634982856642.png

 

Hope this helps : )

 

Labels