views:

16

answers:

1

I handle a lot of time stamps that I store as NSTimeInterval.

NSDateComponents* comps = [[NSDateComponents alloc] init];
[comps setYear: ....
NSDate* date = [gregorian dateFromComponents:comps];
NSTimeInterval timeStamp = [date timeIntervalSinceReferenceDate];

Interface Builder has a table view binding to the variable of the time stamp. How can I format the (double value of) NSTimeInterval into a human readable date format? The Interface Builder Table Column Bindings palette has a input field Value Transformer - can I do something here?

A: 

The trick is to drag and drop NSDateFormatter from the Library panel to the table view cell.

JJD