I use api, which returns the date as a string, for example:
2011-06-13T21: 15: 19Z
As you can imagine, this is not the easiest format to understand. My goal is to make it format like this:
9:15 pm - 6/13/2011
Does anyone know how to do this? Do I need to use a regular expression or is there a way to convert it to DateTime?
NOTE: I tried to use the method DateTime.ParseExact, but it did not work. If this is a solution, can you show me how to convert the above example. Thank.
source
share