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

Alteryx Designer Desktop Discussions

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

Extracting Date from Filename

KamenRider
11 - Bolide

Good day,

 

Can I ask for you help in extracting the date from a filename? See below filename.

 

DDB Fest.Daily_01.05.24_Final.xlsx
DDB Sander Daily_01.08.24_Final.xlsx

 

Results of date should be 2024-01-05 and 2024-01-08.

 

Thanks and looking forward for your assistance.

 

Kamen

5 REPLIES 5
Bren_Spill
12 - Quasar
12 - Quasar

See attached workflow

KamenRider
11 - Bolide

Hi @Bren_Spill 

 

Would you know why I am getting a null result?

 

date.PNG

Hoping for your response. Thanks,

Kamen

nagakavyasri
12 - Quasar

@KamenRider  Try this:

 

Capture13.PNG

binuacs
21 - Polaris

@KamenRider 

DateTimeParse(REGEX_Replace([File Name], '.*_(\d{2}\.\d{2}\.\d{2})_.*', '$1'),'%m.%d.%y')

image.png

Raj
16 - Nebula

Use this formula 

DateTimeParse((regex_replace([Field1], '.*_(\d{2}\.\d{2}\.\d{2}).*', '$1')), "%m.%d.%y")

delevering the required results

Labels
Top Solution Authors