Cs Quartals Ende Mit C Sharp


Summary: Quartalsende mit C# berechnen
Keywords: Quartalsende, C#, berechnen, ermitteln
 DateTime QuarterEnd(DateTime moment)
 {
        int qeMonth = ((moment.Month-1)/3+1)*3;
        DateTime qe = new DateTime(moment.Year, qeMonth, 1);
        qe = qe.AddMonths(1).AddDays(-1);
        return qe;
 }