Code Logs
ASP.NET,C#.NET,MVC,SQL Server,Visual Studio related blog
Wednesday, January 5, 2011
Date time how to get last month or previous month.
This is good example of datetime how to get last month.
DateTime LastMonthDate=DateTime.Now.AddMonths(-1);
Response.Write(LastMonthDate.ToString("MM/dd/yyyy"));
DateTime.Now.AddMonths(-1).ToString("MM/dd/yyyy")
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment