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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:55:36+00:00 2026-06-05T20:55:36+00:00

I seem to be running into great difficulty in attempting to convert a Google

  • 0

I seem to be running into great difficulty in attempting to convert a Google Calendar date string (parsed from a public JSON), into NSDate format.

The result from Google’s Calendar API is in the format:

"2012-06-20T11:00:00.000+01:00"

I’m trying to format this as an NSDate, as follows:

NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
formatter.dateFormat = @"yyyy-MM-dd'T'HH:mm:ss.SSSzzz";
NSDate *gmtDate = [formatter dateFromString:[whenDict objectForKey:@"startTime"]];

However, I keep getting a null result, so I was wondering if anyone knows what the correct [NSDate dateformat] would be for the result that I’m trying to convert…

I’ve tried all sorts of dateFormat variations but I haven’t managed to find the right one, after a couple of hours of messing around with multiple letter variations!

i.e. I believe the issue is in the line:

formatter.dateFormat = @"yyyy-MM-dd'T'HH:mm:ss.SSSzzz";

Cheers,

  • 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-05T20:55:38+00:00Added an answer on June 5, 2026 at 8:55 pm

    It seems that +01:00 is not a standard time zone so you will have to change it to +0100 removing the colon from it (refer to iPhone NSDateFormatter Timezone Conversion)

    You could use the following code

    NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
    formatter.dateFormat = @"yyyy-MM-dd'T'HH:mm:ss.SSSZZZ";
    NSString *dataString = @"2012-06-20T11:00:00.000+01:00";
    NSMutableString *mutableDate = [dataString mutableCopy];
    [mutableDate deleteCharactersInRange:NSMakeRange(mutableDate.length - 3, 1)];
    
    NSDate *gmtDate = [formatter dateFromString:mutableDate];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I seem to be running into a documentation drought with CURL vs FTP, can
I am running into a problem that just doesn't seem right. I've got a
I'm running into a problem that I can't seem to get past. Whenever I
I'm trying out java and I seem to be running into some problems. The
Here's a problem that I seem to be running into working with an accounting
I seem to be running into a problem with Rails 3 and I can't
I'm trying to write an xml parser but seem to be running into some
I'm trying to get prettyPhoto to work, but I seem to be running into
I seem to be running into an odd problem. When using my GWT application
I'm running into a problem that I can't seem to solve. The code works

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.