Alteryx Designer Desktop Discussions

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

Convert String field to Month

AnGi
7 - Meteor

Hi guys, little help for a beginnner

 

I have a field with string datatype like this

Month

1

2

3

...

 

I want a new field where 1 is Jan, 2, is Feb and so on

 

Could help?

5 REPLIES 5
LordNeilLord
15 - Aurora

Hey @AnGi 

 

I'd go for something like this:

 

DateTimeFormat("2020-"+PadLeft(ToString([Field1]),2,"0")+"-01", "%b")

 

I would also recommend that you bookmark this page as its super helpful:

 

https://help.alteryx.com/10.1/Reference/DateTimeFunctions.htm

grazitti_sapna
17 - Castor

Hi @AnGi , I hope this helps.

Thanks.

Formula Used:

datetimeformat("2020-"+padleft(tostring([Month]),2,"0")+"-01","%B")

grazitti_sapna_0-1594114083803.png

 

 

 

Sapna Gupta
atefehhez
6 - Meteoroid

Hi,

Here my solution with the half of the steps of the oriinal solution.

Kr,

Atefeh Hezavehei

Felipe_Ribeir0
16 - Nebula

Hi @atefehhez 

 

I think that you made some confusion with your browse tabs, here is the right link to post the challenge 193 solution:

 

https://community.alteryx.com/t5/Weekly-Challenge/Challenge-193-Unofficial-Holidays/td-p/500029

 

atefehhez
6 - Meteoroid

Thanks, here the updated solution.

Labels