I know there are lot of questions on this topic . But I am not getting a proper solution to my
problem.I am retrieving Date
from db , I am getting the Output as
as 2012-07-13 00:00:00.0
.
I am getting the output in the string format . I want the result of type string in the
format MM/dd/yyyy
.I am doing the following
NSString *dateStr=@"2012-07-13 00:00:00.0";
NSDateFormatter *df=[NSDateFormatter new];
[df setDateFormat:@"yyyy-MM-dd"];
NSDate *res=[df dateFromString:dateStr];
But here I am getting res as nil
.