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

What is an easy way to create DateTime from a string that contains date in the following format "yyyyMMdd"?

P: n/a
Hi,

What is an easy way to create DateTime from a string that contains date in
the following format "yyyyMMdd"?

Take care,
Sasha
Nov 15 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Sasha" <no@no.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi,

What is an easy way to create DateTime from a string that contains date in
the following format "yyyyMMdd"?

Take care,
Sasha


Use the ParseExact method: DateTime.ParseExact(stringvalue, "yyyyMMdd",
null)

Arild
Nov 15 '05 #2

P: n/a
Damn, it is so easy! :)
Thank you Arild!
"Arild Bakken" <ar*****@hotmail.com> wrote in message
news:On**************@TK2MSFTNGP09.phx.gbl...
"Sasha" <no@no.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi,

What is an easy way to create DateTime from a string that contains date in the following format "yyyyMMdd"?

Take care,
Sasha


Use the ParseExact method: DateTime.ParseExact(stringvalue, "yyyyMMdd",
null)

Arild

Nov 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.