-3

How can I convert a datetime string like December 13, 2015 09:55 PM to a DateTime?

YWah
  • 571
  • 13
  • 38

2 Answers2

1

Try this

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;


namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string strDate = "December 13, 2015 09:55 PM";
            DateTime date = DateTime.ParseExact(strDate, "MMMM dd, yyyy hh:mm tt", CultureInfo.InvariantCulture);

        }
    }
}
​
jdweng
  • 33,250
  • 2
  • 15
  • 20
0

DateTime.Parse("December 13, 2015 09:55 PM")

Konstantin Zadiran
  • 1,485
  • 2
  • 22
  • 35