Date formated to month
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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,
Solved! Go to Solution.
- Labels:
- Data Investigation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @AJ_AJ 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @AJ_AJ,
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)
I hope it solves your issue. 
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @AJ_AJ 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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
