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

string 2 date conversion

P: n/a
I have a string looked this
"2003-07-08T13:04:00.0000000"

How do I convert it into a System.DateTime object?

Regards

Michael
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi Michael,

You can use DateTime.Parse or DateTime.ParseExact , the different is that
the latter expect that the string being on a especified format.

Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Michael Wu" <do**************************@my.com> wrote in message
news:Ok**************@TK2MSFTNGP12.phx.gbl...
I have a string looked this
"2003-07-08T13:04:00.0000000"

How do I convert it into a System.DateTime object?

Regards

Michael

Nov 13 '05 #2

P: n/a
Michael, check out the DateTime.Parse() method.

--
Greg Ewing [MVP]
http://www.claritycon.com/
"Michael Wu" <do**************************@my.com> wrote in message
news:Ok**************@TK2MSFTNGP12.phx.gbl...
I have a string looked this
"2003-07-08T13:04:00.0000000"

How do I convert it into a System.DateTime object?

Regards

Michael

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.