Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
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
22 - Nova
22 - Nova

Hi @jjenny50 

 

You can ToDate([Date]) or ToDateTime([Date]) function like below

 

Workflow:

atcodedog05_0-1634909969101.png

 

Hope this helps : )

 

csmith11
11 - Bolide

Solution above is great!

jjenny50
7 - Meteor

For some reason that does not work for me -now everything comes back as null.  When my date field originally comes in as a double. I changed it with a select tool to V_WString. then do the the formula provided.

 

jjenny50_1-1634913052913.png

 

jjenny50_0-1634912899389.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @jjenny50 

 

Dont change it to V_string keep it has a number(double) datatype it should work.

jjenny50
7 - Meteor

When I leave it as is - I don't get an option for my fields in the formula column

 

jjenny50_1-1634914329230.png

 

 

jjenny50_0-1634914231413.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @jjenny50 

 

If the column is checked in select tool it should till work. Try typing the column name in formula or use the formula tool before selecting.

 

Hope this helps : )

jjenny50
7 - Meteor

Thank you. I removed the Select tool, and now I get a parse error:  LOL, maybe this isn't just meant to be.  

 

jjenny50_0-1634914982702.png

 

jjenny50_1-1634915047821.png

 

 

atcodedog05
22 - Nova
22 - Nova

Hi @jjenny50 

 

This is strange can you share a sample excel file I can take a look into it.

jjenny50
7 - Meteor

 I took all the data out of the file and deleted a bunch of rows (since my file has 92K+ rows), and just left the date fields.  

Labels
Top Solution Authors