Am working in an iPhone app with using the NSDateFormatter. Am getting the time from the webservice like \"00:00:00\", \"16:00:00\",\"15:30:00\" and so on. I ne
\"00:00:00\", \"16:00:00\",\"15:30:00\" and so on
This Below code always keep in 12hour format:
NSLocale *12hourFomrat = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]; df.locale = 12hourFomrat;
This always keep in 24 hour format
NSLocale *24hourFormat = [[NSLocale alloc] initWithLocaleIdentifier:@"en_GB"]; df.locale = 24hourFormat