Free Trial

Alteryx Designer Desktop Discussions

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

Date Format Parse - From YYYY-mm-dd to Mon-YYYY in date format not in String format.

Falcon8273
5 - Atom

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

12 REPLIES 12
vizAlter
12 - Quasar

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

 

vizAlter_0-1600844458606.png

 

jdunkerley79
ACE Emeritus
ACE Emeritus

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 

grazitti_sapna
17 - Castor

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.

 

grazitti_sapna_0-1600844521614.png

 

In short if you want to convert it into DEC-2020 format this will be output as string.

grazitti_sapna_1-1600844611928.png

 

Thanks.

 

 

Sapna Gupta
Falcon8273
5 - Atom

Hi @vizAlter - I need the output format as Date and not string.

 

thanks

vizAlter
12 - Quasar

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.

 

vizAlter_1-1600845398425.png

 

 

vizAlter_0-1600845339323.png

 

Falcon8273
5 - Atom

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.  

 

DateSales

2020-01-20

7800
2020-02-24

8100

2019-08-19

900
2020-08-101000

 

Desired Output - Create a Cross tab to arrange the table in Past to  present month order as below without manually changing the row.

 

MonthSales

Aug 2019

900
Jan 2020

7800

Feb 2020

8100
Aug 20201000
atcodedog05
22 - Nova
22 - Nova

Hi @Falcon8273 ,

 

Can you attach a workflow so that its more clear.

atcodedog05
22 - Nova
22 - Nova

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.

vizAlter
12 - Quasar

@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.

Labels
Top Solution Authors