Sir how to get current month and year from current date for comparing purpose?
And how to convert the string format?
Please help me....
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
aravinth kandasamyPosted Apr 21, 2015, 4:04 AM
Venkat KumarPosted Apr 21, 2015, 3:12 AM
{
//Current Month and year from current date
DateTime a = DateTime.Now;
Response.Write(DateTime.Now);
Response.Write(a.Year);
Response.Write(a.Month);
//Convert Date to string
string b = DateTime.Now.ToString("dd-MMM-yyyy");
}
Dipankar BiswasPosted Apr 21, 2015, 3:01 AM
more hlp...see this link http://www.jquerywithexample.com/2013/10/get-current-month-and-year-in-jquery.html