Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using NSDateFormatter, and sorting issues



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.