Common C#/C# BEST TIP2009. 6. 20. 19:24

1. DateTime.DaysInMonth(int Year , int Month)

2.
string DateString = "2007-12-26 11:29:34.537";
        DateTime nt = DateTime.Parse(DateString.Substring(0,7) + "-01");
        nt = nt.AddMonths(1).AddDays(-1);         
        this.Text = nt.ToString("yyyy-MM-dd");

Posted by penguindori