Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

DateTime Frustration: Null values when it converts; date will only display as a string

8 - Asteroid

Hi All,


I am frustrated with the date time function- I have combed through the discussions here, searching out my answer. I have tried a bunch of different ways to get my date to convert without having to convert it in the raw data and tweak my entire work flow.


Here's the 'sitch: 

I have a date that is coming in, as a date, like this: 01/20/2019. 

I want the date to convert to this: 2019-01


This is sales data and I am looking at it by month, so to have the individual days is a noisy nightmare, especially when I bring the data into an interactive chart. 


I have tried stringing together several DateTime tools...when I get the character established, it returns Null values. 

When I get it to return the correct "shape" (2019-01), it's showing through as a string. 


The closest I came was by using a date parse tool - but even that didn't work correctly. 


I've got 4 DateTime tools stacked - and the date is spitting out 2019-01-01. I do NOT want the day. 






Hey @tessa ,


So sorry for the confusion, I believe I know what you are looking for. To accomplish this I used a DateTime tool to format the incoming dates to the correct Alteryx DateTime format (YYYY-MM-DD). From there you can use a DateTimeFormat function to correctly format the dates to the month level. See attached workflow and photo. 


Let me know if you have questions. 



8 - Asteroid

Thank you- this seems to work! Appreciate the quick turn-around! 

Alteryx Alumni (Retired)

@tessa I understand your frustration. Date/times are frustrating for many users, trust me! Attached is the workflow that grabs year and month in many ways. Attached is the workflow that does it what you are looking for in multiple ways. Hope it helps!




8 - Asteroid

Thank you! It's good to know several ways to approach a problem 🙂 

5 - Atom

I've been struggling with this null thing for two days. So glad I found your approach AND it's simple. Thanks so much.