Free Trial

Alteryx Designer Desktop Discussions

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

Remove zeroes in Month, dd, yyyy format

Jay9204
5 - Atom

Hello all, I saw a post on how to remove zeros from a date with a REGEX_Replace formula, but I can't figure out how to get it working with a Month, dd, yyyy format. See attached image for the format.

 

For example. I need December 03, 2020 to be formatted as December 3, 2020.

 

Thanks!

 
4 REPLIES 4
nagakavyasri
12 - Quasar

@Jay9204 Use the formula:  REGEX_Replace([Field1], "(\w)\s0?(\d+),(\d+)", "$1 $2,$3")

 

Screenshot 2024-11-15 140320.png

Jay9204
5 - Atom

Hello,

 

This doesn't seem to be working. Your text input does not have a space after the comma (ex. December 3,2020). There must be a space after the comma (ex. December 3, 2020). I cannot figure out how to reconfigure the formula, is it possible you can send an update?

nagakavyasri
12 - Quasar

@Jay9204 Try this: REGEX_Replace([Field1], "(\w)\s0?(\d+),\s(\d+)", "$1 $2, $3")

 

Screenshot 2024-11-18 125836.png

Jay9204
5 - Atom

That works! Thank you so much for your help!

Labels
Top Solution Authors