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 after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. 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

Regex Replace conversion

lledl
7 - Meteor

HI,

I have date fiels that is in YYYY-MM-DD-HH.MM.SS.MSSSSS (EXAMPLE : 2016-11-16-10.48.12.123456)

How do I convert this 2016-11-16-10.48.12.123456 to 2016-11-16 10:48:12 with formula function

YYYY-MM-DD-HH.MM.SS.MSSSSS to YYYY-MM-DD HH:MM:S S

1 REPLY 1
RodL
Alteryx Alumni (Retired)

You can typically use the Time/Date specifiers for just about any format. Check Help for the different specifiers available.

 

Try this expression...

 

DateTimeParse([DateTime], "%Y-%m-%d-%H.%M.%S")

 

Depending on your need for exact precision (which you eliminate anyway through any process), it looks like it truncates the milli-seconds as opposed to rounding though.

Labels
Top Solution Authors