I’m using an api that returns the date as a string, like so:
2011-06-13T21:15:19Z
As you can imagine this is not the easiest format to understand. My goal is to get it to format like this:
9:15pm – 6/13/2011
Anyone know how to accomplish this? Do I need to use a regular expression or is there a way to convert this to a DateTime?
NOTE: I have tried to use the DateTime.ParseExact method but it didn’t work. If this is the solution could you please show me how to convert the example above. Thanks.
1 Answer