Can you please recommend a solution how to achieve a format like this with NSDateFormatter using simple NSString format (i.e. HHMMYY etc..). The predefined styles almost match my requirement, but only almost.
I need this format:
15 Aug 12
27 Apr 11
31 Jun 12
If it’s not possible, should I use the class method dateFormatFromTemplate:options:locale:?
Look at the
-setDateFormatmethod in the documentation, and use the date formats you would like to convert the date from the following guide.Guide: http://unicode.org/reports/tr35/tr35-6.html#Date%5FFormat%5FPatterns
Documentation: https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSDateFormatter_Class/Reference/Reference.html
Using the aforementioned guide, you should be able to use the following code to convert the date.