How to escape characters from NSDateFormatter
format?
NSDate *currentDate = [NSDate date];
NSDateFormatter *dateFormater = [[NSDateFormatter alloc] init];
[dateFormater setDateFormat:@"dd/MM/yyyy \\a\\t HH:mm"];
NSString *dateFormated = [dateFormater stringFromDate:currentDate];
NSLog(@"%@", dateFormated);
You can escape text by enclosing it in single quotes:
From the docs: