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

  • SEARCH
  • Home
  • 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 6630357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:23:31+00:00 2026-05-25T22:23:31+00:00

My dateFromString is not working and i’m not sure why NSString *purchase = @2011-09-30

  • 0

My dateFromString is not working and i’m not sure why

NSString *purchase = @"2011-09-30 17:47:57";
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat:@"yyyy-MM-dd hh:mm:ss"];
NSDate *date = [dateFormat dateFromString:purchase];

date is ‘invalid CFStringRef’

See anything i might be overlooking?

  • 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-25T22:23:32+00:00Added an answer on May 25, 2026 at 10:23 pm

    in the format

    “hh” means Hour [1-12].

    “HH” means Hour [0-23].

    See UTS Date Field Symbol Table for the date format specifiers.

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

Sidebar

Related Questions

If I use the following code: NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@yyyy-MM-dd'T'HH:mm];
I want add days to an NSDate . The approach below is not working.
To be more precise this is not working for me: NSDateFormatter *formatter = [[NSDateFormatter
Why does NSDateFormatter misinterpretes his own created dateString? NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
I'm trying to use the NSDate dateFromString method but I'm getting an warning and
I am trying to parse the following NSString to an NSDate object: Sat, 21
First the code: NSString* dateTimeString = [NSString stringWithFormat:@%@%@, [aDictionary objectForKey:@date], [aDictionary objectForKey:@time]]; NSDateFormatter* dateFormatter
I'm trying to use dateFromString method from NSDateFormatter but it somehow doesn't work for
I am having problems with NSDateFormatter 's dateFromString method. I have the following date:
NSLog(@%@ - %@ - %@,currTime,sunrise,sunset); NSString *curtime = [[currTime substringToIndex:(currTime.length-4)] stringByAppendingString:@-0000]; NSDateFormatter *formatter1 =

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.