I have a date like this 01/20/2013 and trying to get the unix timestamp for this date. I have searched a lot and found out that how to convert present date into unix timestamp but didn't find my solution.
here is my code what i'm doing.
NSDate *date = mydate; //myDate is the date like 01/20/2013
NSDateFormatter *formatter = [[ NSDateFormatter alloc]init];
[formatter setDateFormat:@"mm/dd/yyyy"];
NSString *timestamp = [formatter stringFromDate:date];
NSLog(@"%@",timestamp);
I'm getting null as timestamp value in my console.