Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Date formated to month

RAJAYKUMAR001
7 - Meteor

Hi All,

 

I am trying to add a formula that converts all my dates to its specific month. for Example 06/19/2020 must just say JUNE. 

 

The below formula did not work.

DateTimeFormat([Field1],"%m")

 

 

Can someone help me with the phrase,

5 REPLIES 5
JosephSerpis
17 - Castor
17 - Castor

Hi @RAJAYKUMAR001 you would need to convert your dates into a format that alteryx recognises as a date which is a YYYY-MM-DD format then you could use datetiemformat formula to make it a month. I have mocked up an example.

 

Dates_06082020.JPG

grazitti_sapna
17 - Castor

Hi @RAJAYKUMAR001,

 

Try using the below phrase:

 

DateTimeFormat([DateTime_Out],"%B").

 

Further more I would like to add if you have multiple formats coming in the input, you first need to convert them into a date format that Alteryx Recognizes(YYYY-MM-DD)

 

datetime1.png

 

I hope it solves your issue. 

Sapna Gupta
RAJAYKUMAR001
7 - Meteor

Did not work,

 

I get this warning in orange

Formula (20) DATETIMEPARSE: Cannot convert "2020-04-29" to a date/time with format "%m,/%d/%y": Month number is out of range 1..12: '2020-04-29'

 

 

Should I have to use select and change the string type?

JosephSerpis
17 - Castor
17 - Castor

Hi @RAJAYKUMAR001 you just need to match the syntax to your date format "%y-%m-%d" would work. I amended my workflow to showcase this. If this does not work can you share an example of your data so it easier to mock up workflow?

RAJAYKUMAR001
7 - Meteor

Thank you,
It worked.

 

 

I did try that as well. 
With your sample I realized that the data string type in Formula bar must be V_Wstring. I had kept it as Date. That was another reason. 

Labels