We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Extract Date from a Filename

KamenRider
11 - Bolide

Hi 

 

Can I ask for your assistance in extracting the date and then convert it to format mm-dd-yyyy.

 

KB_XXXBULK_AGENCY_C_20240920_S1_Input
PB_XXXBULK_AGENCY_C_20240920_S1_Input_compress
LB_XXXBULK_MUMBO_20240920_S1_Input
BC_SIDELINE_MUMBO_20240927_S1_Input
XB_SIDELINENEW_MUMBO_20240927_V1_Input

MO_TUNDED_MUMBO_20240927_S1_Input_Talidation_compress.best.in

 

Thanks,

Kamen

2 REPLIES 2
SPetrie
13 - Pulsar

assuming no other 8 character long number sequences and always an 8 character date, this formula should do it

DateTimeParse(REGEX_Replace([Field1],".*(\d{8}).*","$1"),"%Y%m%d")

KamenRider
11 - Bolide

Thank you so much.

Labels
Top Solution Authors