I am trying to extract the Month and Year from the dates in the following formats. Con some please suggest
Date | Year | Month |
2021-06-04 | 2021 | 6 |
2021-06-17 | 2021 | 6 |
02.06.2021 | 2021 | 6 |
15.06.2021 | 2021 | 6 |
2021-06-16 | 2021 | 6 |
2021-06-21 | 2021 | 6 |
2021-06-23 | 2021 | 6 |
2021-06-25 | 2021 | 6 |
Solved! Go to Solution.
Hi @Abhii2658 ,
the DateTime functions will help you solve this problem.
First step is to convert the [Date] column to a Date data type. As there are two different date formats (YYYY-MM-DD and DD.MM.YYYY) you should use a Formula tool with a condition to apply the "right" DateTimeParse function:
A new field [Date_Converted] with data type "Date" is created.
Second step could be to extract year and month using the functions DateTimeYear and DateTimeMonth from this column.
I've attached a sample workflow, hope this is helpful.
Let me know if it works for you.
Best,
Roland
User | Count |
---|---|
18 | |
14 | |
13 | |
9 | |
8 |