Take the 2-minute tour ×

If I run the following code:

[textView setString:  [ NSString stringWithFormat: @"Hello %@. Today is %@", [ textField stringValue ], [ NSDate date]] ];

it says

Hello Phenom. Today is 2010-07-06 02:37:43 -0700

How can I fix it so that it instead says

Hello Phenom. Today is Tuesday, July 6

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

You need to use a NSDateFormatter.
You can see an example in the doc...

share|improve this answer
add comment

Your Answer


