Hi I have a date data like this "Thursday 01/04/2021 01:50:39" (without quotations) and I wanted to make sure that it is displayed like "01/04/2021" (without quotations) and converted to Date format. I have several columns with similar format, and in order to keep workflow simple, I am looking for a solution to achieve the desired result with a Formula tool. Can anyone help me with this?
Hi @phajiyev
You can achieve this with the DateTimeParse() function and you can learn all about datetime functions and formats here:
https://help.alteryx.com/20214/designer/datetime-functions
If you need to do this for multiple columns, I'd suggest using the Multi-Field Formula tool instead of the regular formula tool.
Playing around with these tools is a great way to learn so I would encourage you to do that rather than just copy the solution that someone is no doubt going to post in this thread!
Happy Alteryxing!
There are also other fun things you can do with Text functions, for instance, if the Getword() function looks a your string, it would see 3 words (numbered 0,1,2) You can therefore extract the middle word from the string (which is the date part) using GetWord(string, 1)
If you then want to convert that to an Alteryx date format, the DatetimeParse() function becomes a little easier to implement.
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
6 |