Alteryx Designer

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

Convert CSV String 30 Jan 2017 07:55:44 to Date/Time

Highlighted
8 - Asteroid

Hi

 I have a beginner question to convert a string to datetime format. My input format in field  [Starttime]  is:

 

30 Jan 2017 07:55:44

 

How can I convert it with the Formula tool (I think) to a date time field ?

 

Many thanks in advance for your answer

 

Steffen

Highlighted
Alteryx Alumni (Retired)

It should work with this....

 

DateTimeParse([Starttime], "%d %b %Y %H:%M:%S")

 

If you check out the Help for Date/Time functions, you will see a section on Specifiers...that's what you put in your "template" to parse what you have into a true DateTime data type.

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Excellent response @RodL.  I tested it and it worked!  

 

You taught me something new today :)

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Highlighted
8 - Asteroid

Thx it works perfect

 

Steffen

Highlighted
Alteryx Alumni (Retired)

@MarqueeCrew, that's a rarity...guess I'm mark today on my calendar! ;-)

 

What's going to be great is in 11.0 we will be able to build out the "custom template" within the DateTime tool...which should be much easier!

Labels