i want to get only the date by using DateTime, how can i do it?
i want to get only the date by using DateTime, how can i do it?
i did it by writing like that
but still at the end there are 00:00:00 is it normal?Code:label6.Text = DateTime.Now.Date.ToString();
You can specify what format it should be printed in:
y/M/d obviously standing for year/month/day, and the amount means how many digits, like yyyy = 2009 and yy = 09. Note the capital 'M' for 'month', as 'm' means 'minute'.Code:ToString("yyyy-MM-dd")
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.