I need to post a NSDate
object using HTTP post to parse.com.
I don't know how to convert it.
//1 nsdate
[params setObject:date forKey:kKeyDate];
//2 nsstring
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat:@"yyyy-MM-dd T HH : mm : ss.SSSZ"];
NSString *newString = [dateFormat stringFromDate:date];
[params setObject:newString forKey:kKeyDate];
Params are serialized in the body of the Http request. I know that everything else I'm doing is correct because if I comment out adding the NSDate
to the params, then it works.