By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,945 Members | 1,650 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,945 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Jan 31 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Mark,

The format to use when parsing is "yyyyMMdd" while the output for the
new output is "dd MMMM yyyy".
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"stainless" <Ma************@gmail.comwrote in message
news:e1**********************************@d21g2000 prf.googlegroups.com...
>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
Jan 31 '08 #2

P: n/a
On input parsing you would use "yyyyMMdd", and on output use "dd MMMM yyyy",

"stainless" wrote:
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
Jan 31 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.