i am new to iPhone application development. i am creating simple application with using of datepicker. i have a date picker and a button. simply i want to print selected date and time when i click on button. bellow is my code.
- (IBAction)showSelectedDate:(id)sender {
NSCalendar *calendar = [NSCalendar autoupdatingCurrentCalendar];
NSDate *pickerDate = [m_datePicker date];
NSLog(@"%@", pickerDate);
}
In log date is print but it is wrong. i am select "2012-03-28 03:26 PM" this date from picker and in log i get the date "2012-03-28 09:50".
Thanks in adv....