Can you please help in achieving the results for the attached conditions
Hi @Lumjing
You'll have to convert all the dates to standard Alteryx format first so you can do the greater than comparison in condition 4 and 5. Use a couple of DateTime tools or a formula tool DateTimeParse([fieldname],"%m/%d/%Y") for each of your fields
Your if statement will look like this
If [Start Date]="Not Applicable" and regex_match([End date],"\d{4}\-\d{2}\-\d{2}") then
[End Date]
elseif regex_match([Start date],"\d{4}\-\d{2}\-\d{2}") and [End date]="Not Applicable" Then
[Start date]
elseif NextCriteria then
.
.
.
else
Null()
endif
The regex_match() checks to see if the string matches a valid date format.
Fill in the remaining conditions from your table.
Dan