NSLog(@"Time From DB %@", mytime.beginTime);
NSDateFormatter *timeFormatter = [[NSDateFormatter alloc] init];
[timeFormatter setDateFormat:@"hh:mm a"];
UILabel *timeLabel = (UILabel *)[cell viewWithTag:1];
timeLabel.text = [timeFormatter stringFromDate:mytime.beginTime];
NSLog(@"Time after formatting %@", timeLabel.text);
[timeFormatter release];
を取得コンソールにDateFormat間違った日付に
2011-07-05 11:16:09.331 My project[1907:207] Time From DB 2011-05-10 13:54:09 +0000
2011-07-05 11:16:09.331 My project[1907:207] Time after formatting 04:54 PM
なぜ時間が異なっていますか?それを修正するには?
ありがとうございます...それは動作します... – Jim