469,927 Members | 2,006 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,927 developers. It's quick & easy.

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

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
2 4475
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
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.

Similar topics

3 posts views Thread by Scott Kinney | last post: by
3 posts views Thread by FlexCrush | last post: by
4 posts views Thread by jty202 | last post: by
3 posts views Thread by acko bogicevic | last post: by
5 posts views Thread by Doug Bell | last post: by
reply views Thread by David Garamond | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.