471,896 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,896 software developers and data experts.

parsing date string

i have string in format
dd/mm/yyyyy hh:mm:ss
and giving this as an input to DateTime.Parse gives a string was not
recognized as a valid date time format string error.
how do i make the parse method to accept formating that i need.
if i do console.writeLine DateTime.Now.ToString it gives the format:

Nov 21 '05
50 4686
"BabyEmperor" <Ba*********@discussions.microsoft.com> schrieb:
I also had a problem with datetime. Searched a lot on the net. Read
a lot of articles. But, none was of any help.

At Last i found an MSDN article which explains the datetime class. it
my problem. its a very good article.

The link of this article is

After going through the article i found that the best way is the following

Date.Today.ToString( System.Globalization.CultureInfo.InvariantCulture )

Hope it solves all of your problems and help you in understanding the
DateTime class.

Whose problem?

M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #51

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Gerrit Holl | last post: by
3 posts views Thread by dont bother | last post: by
9 posts views Thread by Thomas W | last post: by
reply views Thread by bj0011 | last post: by
6 posts views Thread by Tim N. van der Leeuw | last post: by
reply views Thread by Uncle Leo | last post: by
10 posts views Thread by Stu | last post: by
reply views Thread by YellowAndGreen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.