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

Alteryx Designer Desktop Discussions

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

How do I keep a date static while also using a formula?

dlee9
6 - Meteoroid

Hi all,

 

I have a table that will be going into a database/data lake. I have a column that is "created_date" and a column that is "modified_date". When someone updates a record I would like the modified date to be updated while keeping the created date the same. I realize that the modified date should be using the datetimenow() formula but is there a way I can keep the created date from changing? I currently have the created date using the datetimenow formula but realize that it's not the right situation to use it in this instance.

 

TIA!

1 REPLY 1
T_Willins
14 - Magnetar
14 - Magnetar

Hi @dlee9,

 

You could use a formula for the created date that is something like   IF IsNull([created_date]) THEN DateTimeNow() ELSE [created_date] ENDIF

This will add the current date if it is new and keep the created date if it is not.  

Labels
Top Solution Authors