cancel
Showing results for 
Search instead for 
Did you mean: 

substr() function on number values do not return correct values in webi 3.1

Former Member
0 Kudos

Hi friends,

I have  a 6 digit number value like 122012 which denotes month Dec and Year 2012 .I have to seperate the month as 12 and Year as 2012. I defined a variable using below formula,it gave me invalid datatype

=(Substr([SMM Realized Savings Month Code];1;4))

How can I convert the value to string before applying SUBSTR.

I didnt find tochar function in the list

Thanks

Reena

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Reena,

Please try below set of logics

Month=Substr(FormatNumber([SMM Realized Savings Month Code];"######");1;2)

Year=Substr(FormatNumber([SMM Realized Savings Month Code];"######");3;4)

Month=Left(FormatNumber([SMM Realized Savings Month Code];"######");2)

Year=Right(FormatNumber([SMM Realized Savings Month Code];"######");4)

Thanks

Mallik

Former Member
0 Kudos

Hey Mallik......................

Thanks a ton........................

It worked.....................

Really apperciate your help..........

Reena

Answers (0)