I want current time in following format in a string.
dd-mm-yyyy HH:MM
How?
You want a date formatter. Here's an example:
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"dd-MM-yyyy HH:mm"];
NSDate *currentDate = [NSDate date];
NSString *dateString = [formatter stringFromDate:currentDate];