V
V
Vaskiv992018-06-25 23:17:19
C++ / C#
Vaskiv99, 2018-06-25 23:17:19

How to parse Mon May 14 14:09:14 2018 +0300 this date in DateTime c#?

How to parse Mon May 14 14:09:14 2018 +0300 from string to DateTime?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Smilley, 2018-06-25
@Smilley

using System;
using System.Globalization;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            var a = "Mon May 14 14:09:14 2018 +0300";
            var d = DateTime.ParseExact(a,"ddd MMM dd HH:mm:ss yyyy zzz", new CultureInfo("en-EN"));
        }
    }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question