I think the question @Anil_G was asking, what is the logic for start date and end date? Is there a logic to calculate both or is start date given, then calculate the end date? If there’s a calculation, what is it?
Case 1
If dd-mm of start date is same as dd-mm of end date, bot need to change the year only.
(Year 1) will always be this year despite the given date.
Given date(Input) in Datatable
Expected Output (Date splitted into years)
Start date - End date
30-09-2024 - 30-09-2025 (year 1)
30-09-2025 - 30-09-2026 (year 2)
30-09-2026 - 30-09-2027 (year 3)
30-09-2027 - 30-09-2028 (year 4)
30-09-2028 - 30-09-2029 (year 5)
case 2
dd-mm of start date don’t match with dd-mm of end date, bot need to change the date of the end date of each year and bot need to calculate the remaining months. Eg : below 3 months
Given date(Input) in Datatable
Expected Output (Date splitted into years and months)
Start date - End date
30-09-2024 - 29-09-2025 (year 1)
30-09-2025 - 29-09-2026 (year 2)
30-09-2026 - 29-09-2027 (year 3)
30-09-2027 - 30-12-2027 (3 months)