I am making an iPhone application in which I am storing date and time in a column now I want to sort the date and time in the order which occurs first.
How can I do this? please give me some solutions.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Save the
NSDateasNSTimeInterval:The
NSTimeIntervalis just adoublewhich you can save in the a SQLite database.With an simple SQL query you can then select the sort then:
And to get the
NSDateback just: