Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Changing string date YYYY-MMM to last of the month in format dd-mm-yyyy

saya5650
6 - Meteoroid

I am have been experiencing problem with converting string date e.g. 2020-APR to last date of the month 30-04-2020. I have tried DateTime Tool, used different function in the formula tool such as DateTimeParse, DateTimeFormat, ToDate, and DateTimeLastOfMonth but I keep getting null.

 

Would anyone be of help on how to tackle this issue please?

7 REPLIES 7
atcodedog05
22 - Nova
22 - Nova

Hi @saya5650 

 

Here is how you can do it.

Workflow:

atcodedog05_0-1633529697476.png

 

Hope this helps : )

saya5650
6 - Meteoroid

Hi atcodedog05,

 

I sincerely don't know how to thank you but thank you so much for providing this solution. I suffered for many weeks trying different ways. I realised my output format was incorrect, I selected Date formate instead of String.

 

Thank you very for your help.

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @saya5650 

Cheers and have a nice day!

saya5650
6 - Meteoroid

Morning,

 

If I may ask for further help, I am unable to filter the date output as the Data type is in String. I tried to change the Data Type in the Formulae Tool to Date but I get the below error message. Any tips on how to correct this?

 

saya5650_0-1633598725250.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @saya5650 

 

Alteryx only supports DateTime format yyyy-mm-dd

 

You can remove the datetimeformat and use the like formula like below.

 

atcodedog05_0-1633599338557.png

 

Hope this helps : )

saya5650
6 - Meteoroid

Fantastic! it works.

 

Thank you again atcodedog05!

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @saya5650 

Cheers and have a nice day!

Labels