H
Herfried K. Wagner [MVP]
Cor Ligthert said:Thas does CDate as good without any problem.
It doesn't.
That does CDate as well and even in one time, without knowing anything of
globalization settings.
That's wrong.
Cor Ligthert said:Thas does CDate as good without any problem.
That does CDate as well and even in one time, without knowing anything of
globalization settings.
Cor Ligthert said:I have to say that my simple short solution does not work .
So it has to be with CDate when in Israel US settings are used
\\\
Thread.CurrentThread.CurrentCulture = New CultureInfo("FR-fr")
mydatarow("dtt") = CDate("19/10/2004 0:15:51")
Thread.CurrentThread.CurrentCulture = CultureInfo.InstalledUICulture
///
Jon Skeet said:I just wanted to make the point that DateTime.ParseExact
shouldn't be regarded as an entirely culture-insensitive method.
That does CDate as well and even in one time, without knowing anything of
globalization settings.
Nital said:Have you tried the following? It works great.
DateTime.Today.ToString("MM/dd/yyyy hh:mm:ss");
BabyEmperor said:I also had a problem with datetime. Searched a lot on the net. Read
through
a lot of articles. But, none was of any help.
At Last i found an MSDN article which explains the datetime class. it
solved
my problem. its a very good article.
The link of this article is
http://msdn.microsoft.com/netframework/programming/bcl/faq/DateAndTimeFAQ.aspx.
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.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.