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

Formula to extract date from a file name

Analytics_Pooja
8 - Asteroid

Hi Everyone

 

I am looking for a formula to extract date from a file name 'communication.clientreporting.statements.bds.sr.20190118_095020.xml'

 

For all the files the date will always be at this location. 

 

Best

Pooja 

3 REPLIES 3
atcodedog05
22 - Nova
22 - Nova

Hi @Analytics_Pooja 

 

You can use a formula like this

 

REGEX_Replace([Filename], ".*(2\d{7}).*", "$1")

 

Workflow:

atcodedog05_0-1630348505632.png

 

Hope this helps : )

 

Analytics_Pooja
8 - Asteroid

Thank you @atcodedog05 . This works.

 

Best

Pooja 

Kamran1991
11 - Bolide

If your file name is consistent, you can use this workflow to derive the date

Labels
Top Solution Authors