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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:21:16+00:00 2026-05-26T10:21:16+00:00

NSDate *currentDate = [NSDate date]; NSDateFormatter *format = [[NSDateFormatter alloc] init]; [format setDateFormat:@MM/dd/yyyy,h,mm,a]; NSString

  • 0
NSDate *currentDate =  [NSDate date];
NSDateFormatter *format = [[NSDateFormatter alloc] init];
[format setDateFormat:@"MM/dd/yyyy,h,mm,a"];
NSString *dateString = [format stringFromDate:currentDate];
[format release];

NSLog(dateString);

Output in: Device iPhone4

[240:707] 10/25/2011,22,23,

Current language: auto; currently objective-c
warning: Unable to read symbols for /SDK4.2/Platforms/iPhoneOS.platform/DeviceSupport/4.3.3 (8J2)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib

Output in: Device iPad2

[82:707] 10/25/2011,12,28,PM

Current language: auto; currently objective-c
warning: Unable to read symbols for /SDK4.2/Platforms/iPhoneOS.platform/DeviceSupport/4.3.3 (8J2)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib


This thing works fine on Simulator for all.

How to handle this?

More Info:

it is also to notice that the same formatting string resulting in 12 hr and 24 hr clock values in return

  • 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-26T10:21:16+00:00Added an answer on May 26, 2026 at 10:21 am

    finally resolved it.
    it was due to the settings in phone as 24 Hr clock.

    I had to update my code accordingly.

    🙂

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

Sidebar

Related Questions

I have an NSDate object created by NSDate *date = [[NSDate alloc] init]; Later,
I have the following code: [ [NSDate date] descriptionWithLocale: @yyyy-MM-dd ] I want it
I've got a NSDate that represents a specific time. The format of that date
I have: NSDate *d = [[NSDate alloc] init]; unsigned unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit
I am printing NSDate like this: NSDate *date = [NSDate date]; NSString *stringDate =
When I call NSDate *now = [[NSDate alloc] init]; in order to get the
I can get current date of iphone via this code as NSDate *currentDate =
i've seen many questions on NSDateformatter and NSDate, but none could help me out.
How can I output the current date and time with the defaulttimezone? When I
I'm getting the current date/time using [NSDate date] . The value returned is an

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.