Advertisement

05.25.2008 at 08:07AM PDT, ID: 23431272
[x]
Attachment Details

DateTime.TryParse method always return false

Asked by sepknow in C# Programming Language, Microsoft Visual C#.Net, .NET Framework 2.0

Tags: Microsoft, C# .Net 2.0, windows form, C# 2.0, DateTime.TryParse

Need advise why the DateTime.TryParse method always return false?Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
string[] mFormat = 
    { 
        "M/dd/yyyy hh:mm:ss tt", 
        "MM/dd/yyyy hh:mm:ss tt" 
    };
 
if (DateTime.TryParseExact("5/25/2008 3:43:04 PM", mFormat, null, System.Globalization.DateTimeStyles.None, out myDateTime))
{
}
[+][-]05.25.2008 at 08:40AM PDT, ID: 21642947

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: C# Programming Language, Microsoft Visual C#.Net, .NET Framework 2.0
Tags: Microsoft, C# .Net 2.0, windows form, C# 2.0, DateTime.TryParse
Sign Up Now!
Solution Provided By: josgood
Participating Experts: 2
Solution Grade: A
 
 
[+][-]05.25.2008 at 08:47AM PDT, ID: 21642976

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628