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

Martin b
Martin b
4 Points
2 Posts

Hi,

 

How to convert date "08AUG2015" to datetime?

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

Share:   fb twitter linkedin
Answers
Brian
Brian
Participant
536 Points
73 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
banner

Blog

Active User (2)

 Log In to Chat