Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Concatenate month and year variable

Hi, I have a column 'Month' which contains the month names and another variable 'year' which contains years 'YYYY'. How do I concatenate these 2 variables? Thanks.

4 Replies
Not applicable
Author

HI

you can concatenate two fields

Month &'/'& Year as MonthYear

Thanks

Padma

Not applicable
Author

Hi Rachel,

     If you have two variables do this:   

          LET NewVariable = $(MonthVariable) & $(YearVariable);

   

     But if you want to concatenate values stored in one table column (Month) whith one variable you must do it into the script using this      into the LOAD:

         FieldName & VariableName as NewFieldName

         Month & vYear as MonthYear

   

     Let me know if you need more details.

Regards.

Anonymous
Not applicable
Author

I hope you have created a master calendar and you can add the below code

This will create a field called MonthYear automatically

Date(Monthstart(TempDate),'MMM-YYYY') as MonthYear,

its_anandrjs

1. if they are two fields then use it like

Load

Month&'-'&Year  as NewField

From Location;

2. And if they are variables then use it like

Let vNewVariable =  $(vMonthVar)&'-'&$(vYearVar)

3. if Year is variable and month is field then

Load

Month&'-'&'$(vMonthVar)' as NewField

From Location;