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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:29:28+00:00 2026-05-26T17:29:28+00:00

I have an application in which i have made a alarm clock. In my

  • 0

I have an application in which i have made a alarm clock. In my application problem is that when device date and time settings changed then text of label of alarm also changed. For example if time settings is set as 24 hours then in my label ‘s text don’t show am and pm in last while when change settings as 12 hours then in label’s text show am and pm. How detect that what is settings of date and time and how apply validation on label’s text that whatever settings always display in am and pm mode or show in 12 hours settings?

Thanks in advances…

  • 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-26T17:29:29+00:00Added an answer on May 26, 2026 at 5:29 pm
    Use can use this code:
    NSDate *today = [NSDate date];
        NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
        // display in 12HR/24HR (i.e. 11:25PM or 23:25) format according to User Settings
    
        [dateFormatter setDateFormat:@"HH:mm"];
        NSString *currentTime = [dateFormatter stringFromDate:today];
        NSLog(@"%@",currentTime);
        [dateFormatter release];
    Hear currentTime contains always 24 hour time format.
    
    int hour =  [[[currentTime componentsSeparatedByString:@":"] objectAtIndex:0] intValue];
      if(hour > 12){
    //show PM
    }else{
    //Show AM
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made a swings application but there is one problem in that which
I have an application which uses the microsoft kinect device. The thing is that
I am facing a problem, i have a tab application in which i made
I have made an application which uses latest ios facebook sdk to connect. I
I have an application in which we use a hand-made build system.The reason for
I have made a sample application which constructs a filter graph to capture audio
Visual Studio 2010 Express, Windows Forms. Have made myself my first little application which
i have a windows application made in VB.NET which maintains a database, and i
I have made an iphone application like flip cards in which values of cards
Today I faced a strange problem. I have an application which is the same

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.