I fixed my Issue by using NSTimeZone
. here was my problem.it was displaying date as their server date and my current date was not matching to timezone and not able to format it. Thanks for you all friends for helping me to find my mistake.
NSTimeZone *gmt = [NSTimeZone timeZoneWithAbbreviation:@"EST"]; [dateFormatter setTimeZone:gmt];