Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Identify Month and Year from multiple rows

AshishAgarwal
7 - Meteor

Hi Team,

 

I have to prepare one workflow in which I have to identify month and year in one coloumn having 3 lakh rows.

 

There are different date format in rows.

 

Example:

Para-dd-mm-yyyy
Comm/mm/yyyy
Alty-m-yyyy
Date_yyyymm
Top/Kom/mm/yy
Exam_Dar_yyyy-mm
Exam_Roc_yyyy/mm
Exam_Ash/m/yyyy
ABC_XYZ_mmyyyy
Ashish/XYZ/mm/dd/yyyy
Ashish_ABC_mm
Ashish_Vijay_dd-mm

 

one way I thought of doing it by applying filter but then i would be required to apply multiple filters.

Is there any tool which can help to extract month and year only from rows

 

Regard,

Ashish

2 REPLIES 2
FrederikE
13 - Pulsar

Hey @AshishAgarwal,

 

The Go-To Tool for this would be RegEx - but you will need to write a few expressions to catch all of these variants. 

Regex is a language used to extract certain data strings. But you probably need to put some work into learning it, since it's not self-explanatory. 

Felipe_Ribeir0
16 - Nebula

Hi @AshishAgarwal 

 

You gonna need to extract this information using regex formulas to match every possible pattern of date.

 

I suggest you to use this site to test and learn regex101: build, test, and debug regex

 

This piece of code extract the bellow pattern for example:

 

\d{2}\-\d{4}|\d{2}\/\d{4}

2 digits - 4 digits OR 2 digits / 4 digits

Felipe_Ribeir0_2-1667218103526.png

 

Here is a sample workflow with half of the rows solved for you to start with:

 

Felipe_Ribeir0_3-1667219012496.png

 

 

 

 

Labels