JustABeginner
JustABeginner

Reputation: 19

Error: lvalue required as left operand of assignment - How to solve this error?

can anyone give me the help on this kind of error?

Actually i have the below code look like and i want to display the date in lblDate.text but got this error at the third row of the code:

NSDateFormatter *formatter = [[[NSDateFormatter alloc] init] autorelease];
[formatter setDateFormat:@"MMM, yyyy"]; 
[formatter stringFromDate:myDatePickerView.date] = lblDate.text;

Upvotes: 0

Views: 197

Answers (1)

Hetal Vora
Hetal Vora

Reputation: 3361

The last line of your code should be:

lblDate.text = [formatter stringFromDate:myDatePickerView.date];

Upvotes: 1

Related Questions