While Loop Codition


We need to validate first how the month actually looks like

Let’s try with a normal approach and then will deep dive based on the outcome you get

Try with this expression in your while loop

If your month is a string like this January or Jan

NOT MonthIn.ToString.ToUpper.Trim.Contains(CurrentMonth.ToString.ToUpper.Trim)

If it’s a numerical value like this 01 or 11

Then try with this

NOT MonthIn.ToString.Trim.Contains(CurrentMonth.ToString.Trim)

Cheers @Naveen_Kumar2

1 Like