Extract Month (mm) and increment by 1

Hi All,

I am using excel file to read data in the below format .

image

While reading the Period, I need to increment the month by 1.
Eg : 09/18 to 10/18 and enter in my application.

There is a condition, in case of 12/18, my next period should be 01/19.

Any help would be appreciated. If someone can share xaml, it will be great.

try like this buddy @Zahid1
once after getting the date value from the excel with a variable named out_period of type string
out_period = “09/10” (make sure that you are getting in this format from excel or if the format changes we need to change the format accordingly while converting to datetime in the below conversion)
out_period_DT = Datetime.ParseExact(out_period,“MM/yy”,System.Globalization.CultureInfo.InvariantCulture)

where we have out_period_DT of type DateTime
to increment by one month
out_period_DT = out_period_DT.AddMonths(+1)

1 Like

Here you go buddy a xaml @Zahid1
hope its resolved
month.zip (17.6 KB)
Kindly try this and let know buddy
Cheers @Zahid1

Thanks a lot Palaniyappan for such a quick turnaround.
I will check the xaml and will reply back.
Appreciate your help buddy.

sure buddy
kindly let know whether this works or not
Cheers @Zahid1

@Palaniyappan : Thanks a lot Buddy, it’s working perfectly.
You Rock !!!

Fantastic buddy
Cheers @Zahid1

@Palaniyappan,
Need some more help on the same workflow.
Need to update the same input file with the output in Column Period1.

image

Could you please update the same xaml.

1 Like

here you go buddy @Zahid1
month (2).zip (17.8 KB)
Cheers

@Palaniyappan,
Thanks a lot. It’s working fine.
Cheers Buddy !!!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.