PDA

View Full Version : NSDateFormatter Styles - x days x hours x minutes x seconds?




CaptainZap
Sep 7, 2008, 05:00 PM
I've been reading through the documentation trying to find something that produces a string like this from two NSDates: "5 days 3 hours 52 minutes and 34 seconds". So far I haven't found anything and am just wondering if I missed something or if I'll have to do this the hard way.

Thanks



robbieduncan
Sep 7, 2008, 05:04 PM
Look at the documentation more carefully. The setDateFormat: method allows you to set any format you like.

CaptainZap
Sep 7, 2008, 05:22 PM
K thanks, for some reason I was stuck on the -setDateStyle method and knew none of those fit what I was looking for.