Start Free Trial

Alteryx Designer Desktop Discussions

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

Change list of dates to a month

wonka1234
10 - Fireball

Hi,

 

How can I change my list of dates throughout the year to the month only?

 

DateCount
12/31/20221
12/30/20222
12/29/20223
12/28/20224
12/27/20225
12/26/20226
12/25/20227
12/24/20228
12/23/20229
12/22/202210
12/21/202211
12/20/202212
12/19/202213
12/18/202214
12/17/202215
12/16/202216
12/15/202217
12/14/202218
12/13/202219
12/12/202220
12/11/202221
12/10/202222
12/9/202223
12/8/202224
12/7/202225
12/6/202226
12/5/202227
12/4/202228
12/3/202229
12/2/202230
12/1/202231

 

 

to

 

2022-12  496

 

 

This would need to be repeated for any month.

 

Thanks.

5 REPLIES 5
JamesCharnley
13 - Pulsar

@wonka1234  a couple of date calculations can do this one for you, parse and format.

 

JamesCharnley_0-1674748122823.png

 

To fully match your output you can then just summarize

 

JamesCharnley_0-1674748200864.png

 

binu_acs
21 - Polaris

@wonka1234 one way of doing this

binuacs_0-1674748268350.png

 

wonka1234
10 - Fireball

@JamesCharnley  what if my date format is '2021-08-31' and a string? I am getting null using your formula.

MilindG
12 - Quasar

MilindG_0-1674749791728.png

 

JamesCharnley
13 - Pulsar

@wonka1234  I did my DateTimeParse formula to match your given input (with the slashes). If your date is a string in another format you need to change the parameter to match it, whatever it is. Though your example is the correct ISO format for Alteryx (yyyy-mm-dd)

Labels
Top Solution Authors