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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:07:53+00:00 2026-06-05T02:07:53+00:00

I have a date in the format Tue, 29 May 2012 00:56:14 +0000 from

  • 0

I have a date in the format Tue, 29 May 2012 00:56:14 +0000 from an XML file, which is not under my control so the original format cannot be changed.

I was researching for how to create format strings for NSDateFormatter, found this page, and came up with the following code:

NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"EEE', 'dd' 'MMM' 'YYYY' 'HH':'mm':'ss' 'Z"];
[dateFormatter setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]];
NSDate *parsedDate = [dateFormatter dateFromString:date];

However, after parsing the date above, Tue, 29 May 2012 00:56:14 +0000, with this format string I get 2011-12-27 00:56:14 +0000. So the time is correct, but the date is all jumbled.

Could someone with some more knowledge of NSDateFormatter please explain why this isn’t working? To my knowledge the format string seems correct, but apparently it is not. 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-06-05T02:07:54+00:00Added an answer on June 5, 2026 at 2:07 am

    Your year format string should be lower case, ‘yyyy’

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

Sidebar

Related Questions

I have the following date format: Tue Mar 06 17:45:35 -0600 2012 and I
I have date in string in this formate Tue, 23 Oct 2012 01:05:00 +0000
Hi have Date in a string Format. datevalue= [Tue Mar 06 06:00:00 CET 2012].
How to convert the date Tue Nov 13 14:35:04 +0000 2012 String format to
I have a string in the format Tue May 22 2012 11.00 pm .
I have a date in NSString format with this content: 29/02/2012 12:00:00 AM I'm
I have a date format that I am getting from the database and is
I have javascript date object which gives me a date string in this format,
I am working in JavaScript. I have date in below format: Tue Sep 18
I have a Date format coming from API like this: start_time: 2015-10-1 3:00 PM

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.