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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:44:41+00:00 2026-05-27T06:44:41+00:00

This is my JSON { 0 = 2011-11-11; 1 = 2011-12-31; endDate = 2011-12-31;

  • 0

This is my JSON

{
    0 = "2011-11-11";
    1 = "2011-12-31";
    endDate = "2011-12-31";
    startDate = "2011-11-11";
}

My code is

NSString *dateString = [jsonDict  objectForKey:@"0"]

// Convert string to date object
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat:@"EE, d LLLL yyyy HH:mm:ss Z"];
NSDate *date = [dateFormat dateFromString:dateString]; 
[dateFormat release];

But this code is not working.

How do I convert JSON data into date format?

  • 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-27T06:44:42+00:00Added an answer on May 27, 2026 at 6:44 am

    You’re using the wrong format in setDateFormat. You should be using:

    NSString *dateString = [jsonDict  objectForKey:@"0"]
    
    // Convert string to date object
    NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
    [dateFormat setDateFormat:@"yyyy-MM-dd"];
    NSDate *date = [dateFormat dateFromString:dateString]; 
    [dateFormat release];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this JSON response string: {d:{\ID_usuario\:\000130\,\Nombre\:null,\Vipxlo\:0,\Provmun\:null,\Descuentos\:null,\Listaviplocal\:null}}` With this code: - (void)connectionDidFinishLoading:(NSURLConnection *)connection {
My App is a JSON code which involves a date in string type. (Such
I have a serialized json string in the format: [{\Version\:\8.63\,\Date\:\07\/11\/2011 00:00:00\,\Count\:213}, {\Version\:\1.0\,\Date\:\07\/11\/2011 00:00:00\,\Count\:1}, .........
I have this returned JSON: results: Array[15] 0: Object created_at: Wed, 10 Aug 2011
I'm getting this json string info from the server : {members:[[sd2840d,Johny],[jkld341,Marry]]} So I store
I have this json object : { msg_id:134, message:Dick, comment:[ { com_id:9, comment:test, msg_id:134,
I have this json string: $row['medium'] = {\medium\:13|17|1|14, \medium_sub\:21}; now I want to make
How do you parse this json: a:1:{i:3;a:3:{s:8:routtype;s:9:Alpha SS7;s:6:credit;d:4532.600000000000363797880709171295166015625;s:8:validity;s:3:276;}} to php object or array? Tried
I have my json array with is this : [{id:1,cid:1,da:08:00:00,a:12:00:00,data:2011-07-03,persone:3,nome:Via Bligny}, {id:8,cid:1,da:08:30:00,a:14:45:00,data:2011-09-26,persone:2,nome:Via Bligny}, {id:9,cid:1,da:08:30:00,a:14:15:00,data:2011-09-26,persone:2,nome:Via
I have the following JSON returned from an AJAX call: {rows:[{Date:07/10/2011,Value:1206,Action:Drink}, {Date:07/11/2011,Value:2288,Action:Pie}, {Date:07/12/2011,Value:1070,Action:Drink}, {Date:07/13/2011,Value:1535,Action:Beer},

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.