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

Alteryx Designer Desktop Discussions

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

copying a date to another column

KI5JEB
7 - Meteor

I have a situation where we have records that were closed but because the Date Closed field was not automatically populated by the Closed Status in past records it was left blank. For reporting purposes, I want to copy the Date Modified (which is never left null) into the Date Closed field when the record status is Closed so that it will have at least a rough estimate of when the record was closed. Here is the logic:

 

IF ([Date Closed] = Null() or [Date Closed] = "") AND [Request Status] = "Closed" THEN [Date Closed] = [Modified]
ELSE [Date Closed]
ENDIF

 

The problem I'm having is that when I do [Date Closed] = [Modified], the new date in the [Date Closed] field appears as '1899-12-30 00:00:00' instead of the actual date from the [Modified] field. How can I fix this?

 

Thanks

4 REPLIES 4
BenMoss
ACE Emeritus
ACE Emeritus

Your formula should be...

 

IF ([Date Closed] = Null() or [Date Closed] = "") AND [Request Status] = "Closed" THEN [Modified]
ELSE [Date Closed]
ENDIF

 

instead of  [Date Closed] = [Modified] we just need [Modified]

 

otherwise your statement is saying then TRUE which is why you are getting that date.

 

Ben

Storm
9 - Comet

Hi @KI5JEB:

 

I think your error lies in this portion of your code:

 

THEN [Date Closed] = [Modified]

 

Believe this portion of the code should simply be this:

 

THEN [Modified]

 

I tested this with success, after duplicating your issue when using your code.  Please try this suggestion and see if it fixes your issue!

KI5JEB
7 - Meteor
That fixed it. I should have known that... Thank you. :)

Jeff Beaty
Data Analyst
Tech Ops IT - Data Management
918-292-1714





NOTICE: This email and any attachments are for the exclusive and confidential use of the intended recipient(s). If you are not an intended recipient, please do not read, distribute, or take action in reliance upon this message. If you have received this in error, please notify me immediately by return email and promptly delete this message and its attachments from your computer.
Storm
9 - Comet

A second pair of eyes never hurts! :)

Labels