출처 : http://b4you.net/blog/231
1. NSDate to unix timestamp
예 : 현재의 시간을 unix timestamp로 변환하기.
int timestamp = [[NSDate date] timeIntervalSince1970];

2. unix timestamp to NSDate
예 : 2009-06-26 10:51:39의 unix timestamp를 NSDate로 변환하기.
NSDate *date = [NSDate dateWithTimeIntervalSince1970:1245981099];

3. NSDate to date component
예: 2009-06-26 10:51:39의 unix timestamp로 NSDate객체 생성한 뒤 해당 객체를 년/월/일 시/분/초 로 분할하여 표시하기.
NSDate *date;
NSDateComponents *com;
date = [NSDate dateWithTimeIntervalSince1970:1245980099];
com = [[NSCalendar currentCalendar] components:(NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit) fromDate:date];

4. date component to NSDate
예: 2009-06-26 10:51:39 시간을 가리키는 NSDate객체 생성하기
NSDate *date;
NSDateComponents *com;
NSDateFormatter *formatter;
com = [[NSDateComponents alloc] init];
[com setYear:2009];
[com setMonth:6];
[com setDay:26];
[com setHour:10];
[com setMinute:51];
[com setSecond:39];
date = [[NSCalendar currentCalendar] dateFromComponents:com];
formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
NSLog(@"%@", [formatter stringFromDate:date]);
[formatter release];
[com release];

5. D-Day 구하기.
예 : 현재의 날짜와 등록된 날짜간의 D-Day를 구한다.
NSDateComponents *dcom = [[NSCalendar currentCalendar]components: NSDayCalendarUnit
fromDate:date
toDate:d_day
options:0];
NSLog(@"day=%d", [dcom day]);

Formatter : http://unicode.org/reports/tr35/tr35-6.html#Date_Format_Patterns