I have to format the date as below:
19-JUL-2014 10:27:16 IST
How can I do that? Should I send \"IST\" as string object?
I tried -
N
Please try this,
NSDate *date= [NSDate date]; NSDateFormatter *dateFormatter1 = [[NSDateFormatter alloc] init]; [dateFormatter1 setDateFormat:@"dd-MMM-yyyy HH:mm:ss z"]; NSLog(@"%@",[dateFormatter1 stringFromDate:date]);