date format question

M

Mike P

How do I manage to get my date in the format Monday, 23rd July 2003? I
am currently using the code below to get Monday, 23 July 2003, but I
can't figure out how to get the day followed by st, rd, th etc.

datetime.Text = DateTime.Now.ToString("dddd, dd MMMM yyyy")

Any assistance would be much appreciated.


Cheers,


Mike
 
M

Mikael

Try datetime.Text = DateTime.Now.ToString("f");

You can also look up DateTime.ToString in the .NET Framework docs for more
formatting alternatives.

//Mikael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top