Converting month to its number

Avatar

Avatar

Raaghuik1996

Avatar

Raaghuik1996

Raaghuik1996

19-08-2020

Hi,

 

I have a column in a schema containing name of the month like Jan, Feb....etc & I want to convert the name of the month to its specific number like Jan = 01, feb=02...ect in the enrichment activity after pulling it from schema

 

Kindly help if any inbulit function will sort the issue for me

 

Regards,

Raaghu

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Milan_Vucetic

MVP

Avatar

Milan_Vucetic

MVP

Milan_Vucetic
MVP

19-08-2020

Hi @Raaghuik1996

create new column with this expresion:
Iif(@column='January','1' , Iif(@column='February','2' ,Iif(@column='March','3' ,Iif(@column='April','4' ,Iif(@column='May','5' ,'Other')))))

Adjust source column name and other months.

In case you have dates in some column you can use built in function for month number Month (<Date>)

Regards,

Milan

Answers (1)

Answers (1)

Avatar

Avatar

Sukrity_Wadhwa

Employee

Avatar

Sukrity_Wadhwa

Employee

Sukrity_Wadhwa
Employee

31-08-2020

Hi @Raaghuik1996 ,

 

Were you able to solve this with the given help? Do let us know.

 

Thanks!