• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Using NSDateFormatter, and sorting issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using NSDateFormatter, and sorting issues


  • Subject: Using NSDateFormatter, and sorting issues
  • From: "Tom Jones" <email@hidden>
  • Date: Fri, 17 Feb 2006 16:35:39 -0600

I have an app that reads a tab-delimited file into an NSDictionary.
One of the pieces of data in the file is the elapsed time in seconds,
I want to display this in this format HH:MM:SS, so I attached a
NSDateFormatter to the column. Unfortunately the results I get are not
at all what I expected. For instance if my data was 75 seconds, it's
displayed as 18:01:15...my guess is that it's taking six hours off the
time because I am at GMT -6. How do I stop it from doing this?

The second issue is I can't get my numeric data to sort correctly, I
tried padding the numbers with 0's(in the format string), but it still
puts 011 before 002. Any ideas?
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Using NSDateFormatter, and sorting issues
      • From: Deborah Goldsmith <email@hidden>
    • Re: Using NSDateFormatter, and sorting issues
      • From: Deborah Goldsmith <email@hidden>
  • Prev by Date: running code when all notifications have been processed?
  • Next by Date: Re: NSTableView with NSComboBoxCells
  • Previous by thread: Re: running code when all notifications have been processed?
  • Next by thread: Re: Using NSDateFormatter, and sorting issues
  • Index(es):
    • Date
    • Thread