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 9005391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:07:57+00:00 2026-06-16T01:07:57+00:00

This is probably obvious, but I can’t seem to convert a date string into

  • 0

This is probably obvious, but I can’t seem to convert a date string into an NSDate object. Trying with:

NSDateFormatter *df = [[NSDateFormatter alloc]init];
[df setDateFormat:@"HH:mm:ss"];
NSDate *server = [df dateFromString:result];

where result is a c# datetime object converted to a string coming from a webservice. It looks like “12/14/2012 8:00:27 PM”. ‘server’ just keeps coming up as nil.

Also, after i get it to an NSDate, i need to find the difference between ‘server’ and current time, in hours-minutes-seconds. Should I use NSDateComponents?

  • 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-06-16T01:07:58+00:00Added an answer on June 16, 2026 at 1:07 am
    [df setDateFormat:@"HH:mm:ss"];
    

    later

    where result […] looks like "12/14/2012 8:00:27 PM"

    It certainly doesn’t have the format you set, so what do you expect? You have to set the correct format in order to get this working.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am probably missing something obvious with this problem, but i can't seem to
This probably has a really obvious answer, but I can't seem to find it.
This will probably be obvious but I can't find the best way. I want
This is probably an incredibly obvious question, but I just can't figure it out.
There is probably a reeeeeally obvious answer to this, but I can't find it,
I am probably missing something extreamly obvious, but I can't figure this our for
This is probably an obvious answer but I can't figure it out... I'm reading
This is probably a very obvious question but I can't quite figure it out.
Complete beginner so I'm probably missing something obvious but... I can't seem to combine
This is probably an obvious question to many but I'm scratching my head over

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.