ios - NSDateFormatter returning null, but was working just fine before -


i had code work while, stopped working, , returns null, although date valid. here code , output:

 nsdateformatter *dateformatter = [[nsdateformatter alloc] init];     [dateformatter setdateformat:@"hh:mm dd.mm.yyyy"];     nslog(@"date - %@, formatted date - %@", self.date, [dateformatter stringfromdate:self.date]);  date - 2013-09-02 10:00:00, formatted date - (null) 

it works me.

output:

2013-09-04 10:51:10.681 untitled[753:707] date - 2013-09-04 08:51:10 +0000, formatted date - 10:51 04.09.2013 

i used:

nslog(@"date - %@, formatted date - %@", [nsdate date], [dateformatter stringfromdate:[nsdate date]]); 

so there must self.date. can explain or paste more code self.date.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -