DateTime manipulations in C#

            DateTime Today = DateTime.Now;

            DateTime PreviusDay = Today.AddDays(-1);

            DateTime LastWeekDay = Today.AddDays(-(int)Today.DayOfWeek);

            DateTime LastMonth = DateTime.Now.AddMonths(-1);

No comments:

Post a Comment