Alteryx Designer Desktop Discussions

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

Date Extraction

COrr
7 - Meteor

So I attached a some data that has a list of file names and at the end of these file names are a date.  Can someone help me with extracting the date to it's own column and then making sure the dates are all the same format of mm-dd-YYYY?   I've been wearing out my brain on this and I'm sure it's a simple answer and I need a second set of eyes.

7 REPLIES 7
Tyro_abc
11 - Bolide

Hi

Please check the attached wf. I am sure it can be done with less number of steps, but I got this one quick.

 

arundhuti726_0-1606881722751.png

 

Regards

Arundhuti

Qiu
20 - Arcturus
20 - Arcturus

@COrr 
Hope this is what you need.

1202-COrr.PNG

Tyro_abc
11 - Bolide

Tried another option, one step less.

 

 

atcodedog05
22 - Nova
22 - Nova

Hi @COrr 

 

Here is my take on it. Using single formula

 

DateTimeFormat(
DateTimeParse(
Replace(
REGEX_Replace([File Name], "(.*)_([\d_-]{8,10})$", "$2")
, "_", "-")
,"%m-%d-%y")
,"%m-%d-%Y")

Steps:

1. Extract | 2. Replace _ to - | 3. Date parse | 4. Date Format

 

Output:

atcodedog05_0-1606888487206.png

Workflow:

atcodedog05_1-1606888501605.png

Hope this helps 🙂 Feel to ask if you have any questions


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

COrr
7 - Meteor

dude that is awesome! thank you! I was staring at this and my brain was hitting a brick wall for sure! thanks!

COrr
7 - Meteor

I absolutely always forget the Tokenize function! thank you!

atcodedog05
22 - Nova
22 - Nova

Happy to help 🙂 @COrr 

 

Cheers and Happy Analyzing 😀

 

Feel free to reach out if you face any issues 🙂

Labels