community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE

Formatting

My date is in the format 1/1/2017, i want it to display "Jan 2017". How can this be done?

 

Highlighted
Alteryx Certified Partner

Hi @bhargavaprakriti

 

Use the DateTime tool in parse section and select the option "Convert from Date/Time field to Formatted string.

 

In the Desired format for output string you select the format as "Month, year" and run the workflow.

 

it provides what you exactly need.

 

-Haroon

 

Alteryx Certified Partner
Alteryx Certified Partner

Actually you need to use two date time tools.

 

Firstly you need to convert from a string to a true datetime.

 

Then convert from the datetime back to your desired string as per @haroon_sa's post.

 

Ben

Alteryx Certified Partner
Alteryx Certified Partner

@bhargavaprakriti

 

If we assume that the format of 1/1/2017 is DAY/MONTH/YEAR, then you can use a FORMULA tool with a single expression of:

 

DateTimeFormat(datetimeparse([Field1],"%d/%m/%Y"),"%b %Y")

if the day/month is actually month/day, then change the %d/%m to %m/%d.

 

This is a nested expression that parses the text to a date format and then formats that date into your desired output.

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Labels