Like if I am using the code.
NSDateFormatter *df = [[[NSDateFormatter alloc] init] autorelease];
[df setTimeZone:[NSTimeZone systemTimeZone]];
[df setDateFormat:@"dd.MM.yyyy"];
NSDate *today = [NSDate date];
NSString *log_date = [df stringFromDate:today];
//Generate Log Current Time.
[df setDateFormat:@"hh:mma"];
NSString *log_currenttime = [[df stringFromDate:today] lowercaseString];
NSLog(@"Log Date %@",log_date);
NSLog(@"Log Current Time %@",log_currenttime);
My log shows me :
Log Date 19.12.2011
Log Current Time 03:18pm
At least I can remove the Time Padding.
Change your format from
hh:mmatoh:mmaThis will output