Here is the syntax to find current day, month and year by using c#.net
String TodayDate = DateTime.Now.Date.Day.ToString();
String Todaymonth = DateTime.Now.Date.Month.ToString();
String Todayyear = DateTime.Now.Date.Year.ToString();
--------showing day, month and year in text boxes---------------
Date.Text = TodayDate;
month.Text = Todaymonth;
year.Text = Todayyear;
Here is the out put sample.
day=1
Month=4
year=2009
15 years ago
No comments:
Post a Comment