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

Martin b
Martin b
Member
14 Points
2 Posts

Hi,

 

How to convert date "08AUG2015" to datetime?

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

Share:   fb twitter linkedin
Answers
Brian
Brian
Moderator
2232 Points
14 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