/ Published in: Objective C

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
[tempFormatter setDateFormat:@"dd-MM-yyyy HH:mm:ss"]; NSLog(@"startdate ==%@",startdate); [tempFormatter1 setDateFormat:@"dd-MM-yyyy HH:mm:ss"]; NSLog(@"toDate ==%@",toDate); int i = [startdate timeIntervalSince1970]; int j = [toDate timeIntervalSince1970]; double X = j-i; int days=(int)((double)X/(3600.0*24.00)); NSLog(@"Total Days Between::%d",days);
URL: http://stackoverflow.com/questions/6069480/find-total-number-of-days-between-two-dates-in-iphone
Comments
