I need to send an object NSDateusing an HTTP message on parse.com.
I do not know how to convert it.
[params setObject:date forKey:kKeyDate];
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];
Parameters are serialized in the body of the Http request. I know that everything else I do is correct, because if I comment on the addition NSDateto the parameters, then it works.
source
share