Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
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