Änderung Monat

Hello, How can I change file name to the one on next month ? 30.09.2021-> 31.10.2021


Try this.


Is it possible to replace the fixed input 30.09.21 also, take current last of the month and then to last of the new month?


First find out the number of days in next month as below.

        Int DaysInMonth = System.DateTime.DaysInMonth(Now.Year, Now.Month+1)

And then calculate last day of the next month as below.

       Date LastDate = New DateTime(Now.Year,Now.Month+1,DaysInMonth)


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