cancel
Showing results for 
Search instead for 
Did you mean: 

Get year from a date parameter and perform concatenation

el-bahy
Explorer
0 Kudos

Dear,

Using SAC data action, I'm performing a number of calculation based on year/month parameter (multiple values: For ex: 202101, 202104, 202105) that the user select before running the data action.

I m looking to store the result in the [d/Date] = January of the same year, in this case: 202101.

Is there any function to get the year for the year/month parameter and concatenate it with 01 to get 202101?

Many Thanks

Abdessamad

Accepted Solutions (1)

Accepted Solutions (1)

JefB
Active Contributor

Try the FIRST() function

All Script Formulas and Calculations in Advanced Formulas - SAP Help Portal

MEMBERSET [d/Date]= "202001" to "202012"
DATA()=RESULTLOOKUP([d/Date] = FIRST())
The date ranges from 2020 Jan. to 2020 Dec. For each period, FIRST() returns “202001”.

Answers (0)