I have a NSString like Mon Feb 06 20:02:17 +0000 2012. I want to write it in a shorter way, maybe like: DD-MM-YY, HH:MM. I have think that maybe I can convert it to NSDate and again to a shorter NSString, but I don’t know how to convert this strange date format to NSDate.
If you need more information, ask me.
Thanks!
You need to use an
NSDateFormatterto tellNSDatethe format the original date is in and the format you want it in, then you can convert between the two like this: