SOLVED
Date extraction
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Abhii2658
8 - Asteroid
‎08-22-2021
11:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
Labels:
- Labels:
- Data Investigation
4 REPLIES 4
22 - Nova
‎08-22-2021
11:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
16 - Nebula
‎08-22-2021
11:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
binay2448
11 - Bolide
‎08-22-2021
11:50 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
amruthas2
8 - Asteroid
‎02-18-2022
10:11 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
