///
/// Returns the last date of the previous month in yyyy-MMM-dd format...
///
/// Date to get the last date of its previous month
///
{
string str_Last = "";
DateTime dt_Last = new DateTime();
int _Day = 0;
_Day = dt_now.Day;
TimeSpan ts = new TimeSpan(_Day, 0, 0, 0, 0);
dt_Last = dt_now.Subtract(ts);
str_Last = dt_Last.ToString("yyyy-MMM-dd");
return str_Last;
}
-
ShriKrishna Bhardwaj , With ASP.Net, SQL Server, Javascript
1 comment:
I like your article and it really gives an outstanding idea that is very helpful for all the people on web.
Post a Comment