Hi,
I have an issue with a column which has different formats in the same column which I am struggling with, so I would appreciate any help on the community.
I am struggling to have these dates to be read in Alteryx, attached a sample. Cells (a2:a6) formatted as 'general'; cells (a7:a13) formatted as 'date', then in cell A13, the year appears as '89'
I need the dates to appear as dd-mm-yyyy
So I used the following:
Date1
DateTimeParse([Date],'%d-%m'-%Y') - so I changing the string into date; then I do the following
DateTimeFormat([Date1],'%d-%m'-%Y')
The above formula works well for the dates which are formatted in general but the other items appear as Null, so I am struggling on this one.
Regards,
Dan
Solved! Go to Solution.
Hey @DanielCarro
How about using the following,
if REGEX_Match(Date, '\d{4}-\d{2}-\d{2}')
then DateTimeFormat(Date, '%d-%m-%Y')
else Date endif
@Philip thank you very much it did work
@DanielCarro That's great! Then could you mark this as solved please?