How to convert date "08AUG2015" to datetime in C#

Martin b
Martin b
14 Points
2 Posts

Hi,

 

How to convert date "08AUG2015" to datetime?

Views: 9680
Total Answered: 1
Total Marked As Answer: 0
Posted On: 10-Aug-2015 00:17

Share:   fb twitter linkedin
Answers
Brian
Brian
2376 Points
13 Posts
         

Hi Martin,

try following:

DateTime dt;
 
if (DateTime.TryParseExact("08AUG2015",
"ddMMMyyyy",
System.Globalization.
CultureInfo.CurrentCulture,
System.Globalization.
DateTimeStyles.None, 
out dt)
)
{
//....
}

 

Posted On: 10-Aug-2015 00:21
 Log In to Chat