Alteryx Designer Desktop Discussions

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

date set to 1700-01-01 - best way to conver to null

brendafos
10 - Fireball

I am new to Lawson data. 

Date fields to default to 1700-01-01.  I think it would be better to set these dates to null.

What would be the correct approach to this? 

 

The date columns do have some valid, non-null dates. 

 

9 REPLIES 9
JohnJPS
15 - Aurora

Would something like this work:

IIF(!IsEmpty([date] AND [date]=='1700-01-01',Null(),[date])
MarqueeCrew
20 - Arcturus
20 - Arcturus

@brendafos,

 

Use a multi-field formula and select all date fields

 

IIF([_CurrentField_]=='1700-01-01',null(),[_CurrentField_])

This will set 1700 to NULL and keep all other dates.

 

Thanks & have a great weekend,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
brendafos
10 - Fireball

Hum, did not work...

 

multirow.PNG

 

MarqueeCrew
20 - Arcturus
20 - Arcturus

@brendafos,

 

Glad that you updated for date/time.  The checkbox is set for creation of new data fields.  Did you check the new_field values?

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
brendafos
10 - Fireball

... I see your point about looking for new columns, which I didn't do

 

I tried it again, again no luck

 

multirow.PNG

MarqueeCrew
20 - Arcturus
20 - Arcturus

How about incorporating left([field],4)=="1700" for the test?

 

 

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
brendafos
10 - Fireball

I changed it to double quotes around the date and then it worked.

 

Why?

MarqueeCrew
20 - Arcturus
20 - Arcturus
I'll let Alteryx answer that one. Thanks for the update.
Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
brendafos
10 - Fireball

This has ended up being the best choice.

THANKS this is a huge fix.

Labels