Converting "yyyymmdd" date string into "dd monthname yyyy" format

S

stainless

I know this is probably simple but I cannot find a method of
converting a date string into a format that matches the DatePicker
format in C#

eg string "20080131" converted to "31 January 2008"

I tried datetime.parseexact but could not find the definition for the
appropriate format string.

This would be a very useful tool fo me. Any ideas,please?

Mark
 
N

Nicholas Paldino [.NET/C# MVP]

Mark,

The format to use when parsing is "yyyyMMdd" while the output for the
new output is "dd MMMM yyyy".
 
F

Family Tree Mike

I know this is probably simple but I cannot find a method of
converting a date string into a format that matches the DatePicker
format in C#

eg string "20080131" converted to "31 January 2008"

I tried datetime.parseexact but could not find the definition for the
appropriate format string.

This would be a very useful tool fo me. Any ideas,please?

Mark
 

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

Top