Hi,
Please help me to convert the date 2020-12-25 to Dec-2020. I want the output ( Dec-2020 ) in Date format not in String format.
I tried formula and Date parse tool. I couldn't get the desired output.
Kindly help me.
Thanks,
Kishore
Solved! Go to Solution.
Hi @Falcon8273 — Alteryx has standard date format in YYYY-MM-DD only, and you can convert into the desired format, then data type will be String.
Example:
%b-%Y
An alteryx Date field is always stored in YYYY-MM-DD format
If you want to have a filed in Mon-YYYY format it will need to be a string field (or one of the variants)
A formula tool with expression:
DateTimeFormat([Date],"%b-%Y")
should produce what you want
Hi @Falcon8273 , you can only have date time or date format by using the default date format yyyy-mm-dd as alteryx support only this format as default date.If you try to convert it to a custom format
this is the warning you get.
In short if you want to convert it into DEC-2020 format this will be output as string.
Thanks.
Hi @vizAlter - I need the output format as Date and not string.
thanks
Thank you! @jdunkerley79 and @grazitti_sapna
@Falcon8273 — (FYI) If you are using MS Excel for the output, then exported results by new field should give you the dates in your desired format. Refer to attached workflow and test in the generated Excel.
Below is my data with date and sales. Where I try to convert the date to String - Mon YYYY. In cross tab tool. I am not able to get the output in Old to new date format order. Cross tab tool is arranging the Month in ascending or Descending order basis the first alphabet but not able to read the string as date.
Date | Sales |
2020-01-20 | 7800 |
2020-02-24 | 8100 |
2019-08-19 | 900 |
2020-08-10 | 1000 |
Desired Output - Create a Cross tab to arrange the table in Past to present month order as below without manually changing the row.
Month | Sales |
Aug 2019 | 900 |
Jan 2020 | 7800 |
Feb 2020 | 8100 |
Aug 2020 | 1000 |
The issue with the approach is.
That the format needs to be 2020-12-25 for Alteryx to accept as a date. Any other format it doesnt accept as the date.
If you provide you workflow and requirement. We can make it meet the requirement.
@Falcon8273 — Suggest you to go with your Date as they look in Alteryx's Date Format, do whatever you want to (Sort/Filter/CrossTab etc.), then once you think that the output is good for you, then simply convert that Date Field into your "MMM-YYY" format, and de-select(drop) the actual date format; keep new field.