In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more 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