Instance Method

dateFromString:

Returns a date representation of a given string interpreted using the receiver’s current settings.

Declaration

- (NSDate *)dateFromString:(NSString *)string;

Parameters

string

The string to parse.

Return Value

A date representation of string interpreted using the receiver’s current settings. If dateFromString: can not parse the string, returns nil.

See Also

Converting Objects

- stringFromDate:

Returns a string representation of a given date formatted using the receiver’s current settings.

+ localizedStringFromDate:dateStyle:timeStyle:

Returns a string representation of a given date, formatted for the current locale using the specified date and time styles.

- getObjectValue:forString:range:error:

Returns by reference a date representation of a given string and the range of the string used, and returns a Boolean value that indicates whether the string could be parsed.