Norway


Hi, I’m working with API. I’m trying to convert the you get back from the api which is in this :
(YYYY-MM-DDThh:mm:ss.sZ)
To desired format:
(MMM-dd-yyyy)

I get the date back as a string and then using a DateFormatter I create a date object from that string using the desired format. I get an error every saying that data is corrupt. I’m curious if someone could point me in the right direction or help me understand what I’m doing wrong? I will post the code as soon I can.

Code



Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here