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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:52:38+00:00 2026-05-26T12:52:38+00:00

I need to localize the date. i tried with following code but its giving

  • 0

I need to localize the date. i tried with following code but its giving wrong thing.

For Example if my locale is “US” if i take date like(06 August 2011, 10:55 A.M.) from date picker and store in database then after i changed to locale to “Dutch” its working fine, it converts into dutch like (06 augustus 2011 10:55)

If i take date from date picker like (06 augustus 2011 10:55) for locale “Dutch” then I am changing to locale to “US” its display like(06 July 2011 10:55 A.M.),but it should be like(06 August 2011 10:55 A.M.).

I use below code for get date local date from string:

NSDate *past = [NSDate dateWithNaturalLanguageString:@"06 augustus 2011 10:55" locale:  [[NSUserDefaults standardUserDefaults] dictionaryRepresentation]];

please help out me

  • 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-26T12:52:39+00:00Added an answer on May 26, 2026 at 12:52 pm

    You’re going about this the wrong way. You should not store localized strings in your database, just store the actual -date returned from UIDatePicker.

    Use NSDate all the time, and only when you display to the user do you use a NSDateFormatter to show the date in the user’s appropriate locale.

    Hope this helps!

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

Sidebar

Related Questions

No related questions found

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.