Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

How to extract date from V_WString format

Aggsneh
7 - Meteor

Below is my input from excel and Alteryx is reading it in V_WString. I need to extract the date i.e. Jul-20. Can anyone help me out on priority as I am in the middle of automating one file? Thanks

 

01-Jul-2020 3:59:44 PM

5 REPLIES 5
bhrmitra
10 - Fireball

Hi 

 

It seems you forgot to attach your input file.

 

Thanks,

Abhra

Aggsneh
7 - Meteor

File has been attached. Thanks

markcurry
12 - Quasar

Hi @Aggsneh 

 

If your date is in the format '01-Jul-2020 3:59:44 PM' and you just want the Month and Year, in another String variable, use the formula Substring([Date],3,8) which will give you Jul-2020.  But if you want Jul-20, then use Substring([Date],3,3) + "-" + Substring([Date],9,2)

 

If you want to convert that format to an Alteryx Data format, then use the DateTime tool, which the function Custom format of dd-Mon-yyyy hh:mm:ss

 

Hope that helps.

bhrmitra
10 - Fireball

Hi  

 

Apologies I missed you datetime format.

 

1.png

 

If this solves your issue please mark the answer as correct and also hit the like button, if not let me know! I've attached my workflow for you to download if needed.

 

Thanks,

Abhra Mitra

grazitti_sapna
17 - Castor

Hi @Aggsneh, this formula will resolve your issue, fastest and efficient way to achieve.

 

Formula-DatetimeFormat(Datetimeparse([Date Accessed],"%d-%b-%Y"),"%b-%y") 

 

grazitti_sapna_0-1598610253674.png

Thanks.

 

Sapna Gupta
Labels
Top Solution Authors