We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

String to date format

Ahasan13
7 - Meteor

Hi,

 

I am trying to figure out how to change for example "APR 2018" to "4/30/2018". Please note "APR 2018" is in V_WString format. I tried to change it on the select tool but it will not work. Also, "APR 2018" was taken from the file path. 

4 REPLIES 4
Luke_C
17 - Castor
17 - Castor

Hi @Ahasan13 

 

Use a DateTimeParse, DateTimeTrim, and DateTimeFormat function:

 

DateTimeFormat(DateTimeTrim(DateTimeParse([Date],'%b %Y'),'lastofmonth'),'%m/%d/%Y')

 

Helpful information: DateTime Functions | Alteryx Help

 

 

Luke_C_1-1669928480129.png

 

 

PanPP
Alteryx Alumni (Retired)

Hi @Ahasan13 

 

I would utilize the DateTime tool and use the custom option to convert this date to 4/30/2018. Below is a sample image.

 

Date Sample.png

 

Hope this helps, if it does please like this post and if it helps resolve your problem, mark it as a solution. If you have any other questions, please let us know.

Ahasan13
7 - Meteor

Thanks it worked!

PanPP
Alteryx Alumni (Retired)

I am glad it worked. Would you be able to like the post and mark it as a solution so other users can reference it as a solution when searching within the community?

Labels
Top Solution Authors