cancel
Showing results for 
Search instead for 
Did you mean: 

Webi date showing #error

Former Member
0 Kudos

Hi Gurus,

I am using two variable one showing next three month date value and other showing next 6 month date value. But I think formula I am using is wrong.

Please FYA.

Thanks,

Harsh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Hardik,

Can you give me with correct syntax for this above code.

Thanks,

Harsh

Former Member
0 Kudos

Hi Harsh,

You need to create a variable with name "6th_month" with following formula

=If (ToNumber(FormatDate(CurrentDate();"MM")) > 7) Then ToNumber(FormatDate(CurrentDate();"MM")) + 5+100-112

Else ToNumber(FormatDate(CurrentDate();"MM"))+5

You need to create a variable with name "3rd_month" with following formula

=If (ToNumber(FormatDate(CurrentDate();"MM")) > 10) Then ToNumber(FormatDate(CurrentDate();"MM")) + 3+100-112

Else ToNumber(FormatDate(CurrentDate();"MM"))+3

and In other date variable which you have shown in screen shot, use above variables get correct month value.

I hope this clarifies.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Hardik,

Thanks for your help. It helped me a lot in resolving problem.

Thanks,

Harsh

Former Member
0 Kudos

Hi Hardik,

Then how I ll get last day of month because it will give me month value and again I need to change function code which is in screenshot. I don't know the use of function well enough.


Thanks for quick reply and your help will always appreciated.

Thanks,

Harsh

Former Member
0 Kudos

Hi Harsh,

In your variable "test_next6mnth", the definition is as follows:

=LastDayofMonth( ToDate(.....)+"/"+(ToNumber(...))+"/"+FormatDate(...) ; "dd/MM/yyyy")

Change above definition to following

=LastDayofMonth( ToDate(.....)+"/"+ [6th_month]  +"/"+FormatDate(...) ; "dd/MM/yyyy")

[6th_month] definition is given in previous post

--------------------------------------------------------

In your variable "test_next3mnth", the definition is as follows:

=LastDayofMonth( ToDate(.....)+"/"+(ToNumber(...))+"/"+FormatDate(...) ; "dd/MM/yyyy")

Change above definition to following

=LastDayofMonth( ToDate(.....)+"/"+ [3rd_month]  +"/"+FormatDate(...) ; "dd/MM/yyyy")

[3rd_month] definition is given in previous post

I hope this totally clarifies....as explaining beyond this is not possible.

Former Member
0 Kudos

Hi Harsh,

In case of 2 months advance, you need to prepare following logic:

If month_value >10 then

month_value+2+100-112

Else

month_value +2

In case of 5 months advance, you need to prepare following logic:

If month_value >7 then

month_value+5+100-112

Else

month_value +5