[Solved] C# How to get the start date of the current 12 month cycle given a start date and an end date for a period [closed]


You can get the date and month values for start date and the year value for end date and use it to set current start date:

DateTime startDate = (Convert.ToDateTime("02/02/2016"));
var dy = startDate.Day;
var mn = startDate.Month;

DateTime endDate = (Convert.ToDateTime("18/04/2018"));
var yy = endDate.Year;

var currentStartDate = new DateTime(yy, mn, dy);

3

solved C# How to get the start date of the current 12 month cycle given a start date and an end date for a period [closed]