Can someone please help me to arrive at the date, when I have the day, month and year in three different columns.
Any help will be appreciated.
Day | Month | Year | Desired Output | |
10 | 12 | 2009 | 10-12-2009 | |
8 | 6 | 2018 | 08-06-2018 | |
19 | 1 | 2000 | 19-01-2000 |
Solved! Go to Solution.
The formula would be [Day]+'-'+[Month]+'-'+[Year] for your new field, but please note that the Alteryx standard date format is yyyy-mm-dd.
Hi @Upansu!
@DavidP is correct in that you can just append the fields together using the plus sign and quotes. Here are a couple additional specifications if you need them:
iif(length([Day])=1,"0"+[Day],[Day])+"-"+iif(length([Month])=1,"0"+[Month],[Month])+"-"+[Year]
This should still be output as a new string field.
datetimeparse([Day]+"-"+[Month]+"-"+[Year],"%e-%m-%Y")
This will allow Alteryx to recognize your new field as an actual date field if you need to perform any calculations on it or anything downstream and will output the field in Alteryx's yyyy-mm=dd format.