I've just started using C#. I'm trying to create a static method that takes a string as such; 2018-03-15T08:50:00-05:00
and converts it to Mar 3, 2018
. I've researched this for a long time but none of the questions seem to convert to this format, rather all of the answers convert to dd-mm-yyyy
.
I think it would be something like this:
public static string ToProperDate(this string input)
{
return String.Format("{0:dddd, MMMM d, yyyy}", input);
}
Could someone please help me? Thank-you so much.