NSDateFormatter Styles - x days x hours x minutes x seconds?

Discussion in 'iOS Programming' started by CaptainZap, Sep 7, 2008.

  1. CaptainZap macrumors regular

    Jan 17, 2007
    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.

  2. robbieduncan Moderator emeritus


    Jul 24, 2002
    Look at the documentation more carefully. The setDateFormat: method allows you to set any format you like.
  3. CaptainZap thread starter macrumors regular

    Jan 17, 2007
    K thanks, for some reason I was stuck on the -setDateStyle method and knew none of those fit what I was looking for.

Share This Page