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
NSDate* sourceDate = [NSDate date];
NSLog(@"Date is : %@", sourceDate);
NSTimeZone *currentTimeZone = [NSTimeZone localTimeZone];
NSLog(@"TimeZone is : %@", currentTimeZone);
NSDateFormatter * dateFormatter = [[NSDateFormatter alloc]init] ;
[dateFormatter setDateFormat:@"dd-MMM-yyyy HH:mm:ss zzz"];
[dateFormatter setTimeZone:[NSTimeZone systemTimeZone]];
NSLog(@"%@",[dateFormatter stringFromDate:sourceDate]);
This may help you