Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5997459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:16:01+00:00 2026-05-23T00:16:01+00:00

Possible Duplicate: How to Get time difference in iPhone I´m getting date and time

  • 0

Possible Duplicate:
How to Get time difference in iPhone

I´m getting date and time from a JSON feed. I need to find the difference between the date I´m getting from the feed and today´s date and time. Any suggestions how I can do this?

I know I need to subtract the current date with the date I get from the feed, but I don´t know how to do it.

Ex:

Date from feed: Date: 2011-06-10 15:00:00 +0000
Today: Date: 2011-06-10 14:50:00 +0000

I need to display that the difference is ten minutes.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T00:16:02+00:00Added an answer on May 23, 2026 at 12:16 am

    Create two NSDate objects from the strings using NSDate’s -dateWithString:, then get the difference of the two NSdate objects using

    NSTimeInterval diff = [date2 timeIntervalSinceDate:date1];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Get current date and time in PHP I was wondering how can
Possible Duplicate: Retrieving current local time on iPhone? How to get current time ?(hour:minute:second)
Possible Duplicate: What is the difference between using #include<filename> and #include<filename.h> in c++ I've
Possible Duplicates: Difference between dates How to calculate the date difference between 2 dates
Possible Duplicate: how to calculate difference between two dates using java I'm trying something
Possible Duplicate: Getting Dates between a range of dates Let's say I have 2
Possible Duplicate: How do I get the HMODULE for the currently executing code? I'm
Possible Duplicate: Why do I get a segmentation fault when writing to a string?
Possible Duplicate: How do you send email from a Java app using Gmail? How
Possible Duplicate: NoClassDefFoundError - Eclipse and Android I'm seeing this question is getting asked

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.