I am stuck in a very strange situation. I have a database in SQLite having column “DATETIME”. In this column there is a value say “2011-10-05 12:00:46”. I am converting this by using NSDateFormatter, I set the NSDateFormatter like this –
[df setDateFormat:@"yyyy-MM-dd HH:MM:ss"];
[df dateFromString:completedDate];
when i run my project in iPhone simulater this works fine and i got the result as i want. When i debug same project in device and check the value of object type NSDate i got null value.
Please tell me what wrong i am doing.
Thanks
Your date format is wrong. Capital
Mis meant for Month. For Minute you should use smallm. Your date format should look like this.