Alteryx Designer

Find answers, ask questions, and share expertise about Alteryx Designer.
Andy Uttley, Alteryx ACE, makes music with Alteryx | Math + Music

Convert V_WString to date

Highlighted
6 - Meteoroid

Hello!

 

I'm a new Alteryx user and I have a doubt:

 

There is a column with thousands of data like the following:

30-Mar-20 09:15:10 am

30-Mar-20 09:30:11 am

……

(there are results in am and pm time)

 

The data type is:

V_WString

 

I have been trying many ways but I cannot convert it to a DateTime format.

 

Please, help!!

 

Thanks in advance.

 

Adolfo

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hi @Adolfo ,

 

try the formula:

DateTimeParse([Field1], '%d-%b-%Y %X')

 

The field should be defined as DateTime. %d is the specifier for day, %b is the short month name, %Y is the year in 4 digita and %X the time with am/pm.

 

Let me know if it works for you.

 

Best,

 

Roland

Highlighted
13 - Pulsar

Here is the sample workflow. Hope this is helpful. 

 

Capture.PNG

Highlighted
Alteryx
Alteryx

Hi @Adolfo ! You can use the date time tool with the Custom format of: %d-Mon-%Y %I:%M:%S %p

 

AshleyL_0-1587562765164.png

 

Labels