Hi Community,
I face obstacle in the date formatting and selection which i would like to seek for the help.
Date Formatting
1. I not sure how to build the workflow to change the date to become the format : YYYY- MM-DD.
2. Date Selection
For the date below, if the due date was before 2020-12-31, we will choose the due date as final date. However, if the due date was after 2020-12-31, we will choose the 2020-12-31 as final date.
@SH_94 ,
Please see below :
If this solve the need please mark it solved it will help others,
Attached the workflow,
Regards,
Hi @SH_94 ,
For question no.1, one way to do it is with an if statement. You will check if a string contains a "/", and if it does then that means that it's in the format of day/month/year. You can use an embedded function called datetimeparse to convert that string into a date field (More on Date Functions in Alteryx here).
Else your date will be in the year-month-date format that Alteryx is happy with, so you should leave it as is.
Then for question no.2, you adopt a similar logic to convert the dates, but you use an extra if statement to assign the correct Final Date
There are alternatives of course to using the contains function which is more generic (that alternative is called regex) but lets keep it simple for now.
Hope that helps,
Angelos