Hi all,
Could anyone help me to extract month (Jan,Feb etc) and year from below input.
Solved! Go to Solution.
Assuming it’s always the 3 letter abbreviations then selecting the parse method and using the below expression should work. Also make sure that you have ‘case insensitive’ ticked:
(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)
Just noticed you asked for the year as well. Can easily get that by using: (\d{4}).
Hello @sanoopmnr ,
As explains by @DataNath you can use the RegEx tool. This is very powerful.
Another way of doing it is to use the Find & Replace Tool. That have an option that store the find value in a dedicated column. It looks anywhere in the field and can be case sensitive or not.
Then if you have a mapping table with the list of the month you are looking for it will generate the list of any of this month found in the Field1 column.
So I have added 1 for the month and 1 for the year.
I have also added the RegEx @DataNath example for you to compare.
Why use 1 or the other?
Up to you.
RegEx are more advanced and can not be implement/maintain by everyone but are far more powerful.
You also need to hardcoded the list in the tool.
Find & Replace are more beginner usage and then is more maintenable. I also like the fact that the mapping table is external which is also more easy to maintain.
So once more with Alteryx regarding your level/ team level and who is going to maintain you can always find the solution that best fit your need.
Enjoy!
Awesome! This solved my issue. Thank you @StephaneP for taking time to build this workflow.
and thanks to @DataNath also 🙂