Hi,
I am currently using the following code to output the date:-
DateTime dt = new DateTime(); dt = DateTime.Now; lbl_date.Text = dt.ToString("MM/yyyy");
But this shows the date like so “02/2010”. How can i show the date format to show the date as “February 2010”?
Thanks
They don’t post the reference info for custom datetime format strings anywhere, either on the intertron nor in your MSDN help. They expect you to use reflector to figure this out. Really they do.
ok so would i not be able to change the date format how i want it to be?
lbl_date.Text = dt.ToString(“MMMM yyyy”);
Thanks NightStalker, perfect answer!
No problem. Just so that you know
dd = 18 ddd = Thurs dddd= Thursday
MM = 02 MMM = Feb MMMM = February