24 or 12 hour time format

Hi
Is it possible to check whether the iPhone is set to display 12 or 24 hour time format?
I tried checking this by using the NSDateFormatter AMSymbol, but it always seems to return "AM", no matter what time format or locale I have selected on the device.

I don't know of any way to read any of the system settings directly, but this code is sensitive to the system 24-Hour Time switch:
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateStyle:NSDateFormatterNoStyle];
[dateFormatter setTimeStyle:NSDateFormatterShortStyle];
NSString* currentTime = [dateFormatter stringFromDate:[NSDate date]];
label.text = currentTime;
[dateFormatter release];
For some reason I also can't find any NSDateFormatter property that knows about 24-hour time(?!). I probably just need to look harder, but if nothing else, I think you could reliably detect that format by checking for AM/PMSymbol with rangeOfString.

Similar Messages

  • How to convert 12 hour time format to 24 hour time format ?

    Hi,
    How to convert 12 hour time format to 24 hour time format is there any FM if not, please suggest me how to convert .
    regards,
    rakesh

    Hi,
    Have you tried function module HRVE_CONVERT_TIME
    Input parameters will be like
    TYPE_TIME                       B
    INPUT_TIME                      01:00:00
    INPUT_AM_PM                  PM
    Output
    OUTPUT_TIME                     13:00:00
    Regards

  • 24 hour time format

    Since I upgraded to firmware 1.1.1 my time setting to the 24 hour format is not saving. It reverts to the 12 hour format in the main status bar. Does anyone have any suggestions on keeping the 24 hour format from reverting? Thanks in advance!

    Yep, only noticed this yesterday, tried a whole bunch of things, such as changing setting on Date & Time on the computer, changing International settings, changing the iPhone's "Set Automatically" both to ON and OFF to no avail.
    If you try other things, let us know, I just filed a bug report and I can include more info, there's probably others that have done the same by now and I would think some of the developers themselves might have also caught this, it's a pretty evident one.
    It's a question of personal preference, but since I've used 24-Hour format for so long on everything I can, I can't stand the 12-hour format anymore!
    Hoping for the best
    Edit: Updated my Mac Model, don't know why it had the old one...
    iMac Intel 2Ghz 17in OS 10.4.10 / iPhone 8GB v.1.1.1

  • Reminders in 24 hours time format?

    Hi,
    is there any way to set an alarm in Reminders that displays in military time,
    in 24 hours format?
    My regional settings all are in 24 hours. The clock in the menu bar is in 24 hours.
    Why isn't it possible to know, when writting 9:00 whether it's 9am or actually 19:00 ???
    Any clue on this bug?
    Thanks for any help.

    Mines are all in 00-12 formats, and I don't even have an AM or PM next to them
    What when you create one? I can type 09:00 but then I have no idea whether it's am or pm.
    Also I can't enter 21:00
    What is weird is that the Date & Time control panel, where I told it to be in 24-hour format shows the clock as AM:PM in the main "Date & Time" tab.
    The "Clock" tab definitely says "Use a 24-hour clock", it is checked.
    Unticking it and checking it back doesn't change anything.
    All times are shown in 12hours
    If I go to the calendar application, all times are shown as am:pm, ignoring my preferences in the clock settings (system preferences). I think it's a bit strange.
    Am I missing another setting somewhere?

  • Specifying date time format in Finder

    How can I specify the date-time format in Finder for the "date-modified" and "date-created" columns in list view?
    About three years ago, I got a command line instruction to set these formats and I kept it at mm/dd/yy
    Then a couple days ago, I changed the date format in iStat menus and the date-time formats started acting weird. I want the dates to be like "07/08/05" (mm/dd/yy) and then the formats started changing to "November 07, 2008" (month/dd/yyyy). This change seemed to take effect any time I open the view options for a folder. Now I discovered that the date format change depending on the column width according to the format specified in system preferences, international, formats.
    Narrow column, short date format; a little wider to long format, with ellipses if the column is not wide enough; then full format.
    Does anyone know the command line to set the format to keep it to the one I want?

    this doesn't seem to be it. however I now like the way Finder does display dates -- format gets more compact as the width of the column decreases; although there still is some excess space left on the left -- perhaps for AM & PM which I don't use; I use a 24 hour time format instead.
    Happy New Year

  • Convert military hours time to civilian time

    Fellows: How do I convert the military hours to civilian time (hours 1 through 12 followed by either "a.m." and "p.m."). . Thanks
    /* The following program will print hours in military time */
    import java.util.Date;
    public class Hours
    public static void main(String[] args)
    Date currentDate = new Date(); // Date constructor
    int hour = currentDate.getHours(); // method to get hours from the date object
    System.out.println("The hour is " + hour);
    }

    and learn about conventions. 24 hour time format is the standard in most of the world, not just "military time".

  • Is there a way to remove the leading zero from the 24 hour time display in iOS8?

    In the previous versions of iOS, the 24 hour time format for some regions dropped the leading zero from single digit hours: 1:23 for example.
    In iOS8, it appears that once 24 hour time format is toggled, the time is always displayed as four numbers: 01:23 for example.
    Is there a way to revert to this older format without leading zeroes?

    Yes, a colleague of mine was able to figure it out. Just double-click the chapter title in the .aggr project. It places it into edit mode and allows you to remove the ".swf" extension as well as make any other changes to the name that you want. It's so easy now that we know how to do it, but it was tricky to figure out since the chapter list does not appear editable at first.

  • Wiki calendars stuck at AM PM time format

    Hi,
    I was wondering how to set the wiki (web) calendars to a 24 hour time format. It is set at Europe/Amsterdam in the settings but still there is only the AM PM time when entering an event. It does however import correctly into iCal on clients computers. The thing is we want to be able to use the webbased version too.. and nobody in europe uses AM/PM format. I can't for the life of me discover how to change that..
    Help would be greatly appreciated.

    Nobody, as the same situation is in Mountain Lion

  • Change time from number format(ie. 3.50 hours) to regular time format( ie.3:30)

    How do you Change time from number format(ie. 3.50 hours) to regular time format( ie.3:30)

    I performed the following function in order to get my report to view the information the way that I wanted to see it:
    put this formula across from the caption âu20ACu0153Display Stringâu20AC within the âu20ACu0153Format Fieldâu20AC window for description.Â
    whileprintingrecords;
    MonthName(tonumber(Mid({CartonHistory.DateTimeStamp},5,2)),true) & Mid({CartonHistory.DateTimeStamp},7,2) & ", " & Mid({CartonHistory.DateTimeStamp},1,4)Â & " " & Mid({CartonHistory.DateTimeStamp},9,2) & ":" & Mid({CartonHistory.DateTimeStamp},11,2) & "." & Mid({CartonHistory.DateTimeStamp},13,2)
    It converts dates from: 20061212102311xx to: Dec12, 2006 10:23.11.

  • Can Web Intelligence display time in 24-hour clock format?

    I would appreciate your kind help in answering this question:  How can I change the time format in a formula so as to display time in the 24-hour clock format?
              Presently the CurrentTime() value format looks like this  :  02:26:25 PM GMT-04:00
              Instead, I want it displayed in the 24-hour clock format like this  :  14:26
    I'm developing Web Intelligence reports in the BusinessObjects Enterprise XI 3.2 InfoView environment.
    I searched several places for an answer to this question, but had no luck.
    I searched the BusinessObjects Enterprise InfoView online help document (i.e., Web Intelligence Java Report Panel); I also searched two web sites: the Experts-Exchange website, and the BOB www.forumtopics.com website.
    I figured out that there is built in conversion function FormatDate() that can convert a date value into a text value, as for example :  FormatDate( CurrentDate(); "mmmm dd, yyyy" )
    However, I have not found an equivalent time function that would convert a time value into a text value of a specified format.
    Edited by: OSoccer on Jul 7, 2010 9:05 PM
    Edited by: OSoccer on Jul 7, 2010 9:06 PM
    Edited by: OSoccer on Jul 7, 2010 9:08 PM

    Anil,
         Perfect;  you answered my question!
         The only thing that I had to do differently was to leave off the quote marks from the string "HH:mm:ss" when I entered it into the Custom Date/Time box of the Number Format dialog window.
         While on this subject of the Number Format dialog window, I saw that the Date/Time box already held the following string value:
                    FULL_DATE
         So, thinking that I should leave that value alone, I entered the string "HH:mm:ss" in the box labeled "Undefined" next to the Date/Time box, instead.  That didn't work.  It just caused the webi report to display the CurrentTime() value as a long date, like this:
                   Friday, July 9, 2010
         So then I replaced the string "FULL_DATE" (without the quotes) with the string "HH:mm:ss" (first with and then without the quotes).  In the first try, the report displayed the time as "14:20:34"; in the second try, the report displayed the time as 14:20:34.
         Questions:
         Can you please tell me:
         1. What is the meaning and usage of the label FULL_DATE?
         2. In my attempts to get the time formatted the way I wanted it to look, I filled the Properties list (of the Number Format dialog window) with junk labels such as those listed below.  How can I delete these labels?
                   FULL_DATE; "HH:mm:ss"
                   FULL_DATE
                   FULL_DATE
                   FULL_DATE; "HH:mm:ss"
         3. What is the purpose of the box labeled "Undefined" next to the Date/Time box?

  • Can I change the time format of incoming mails, in Mail? Now I have AM/PM, but I live in Denmark where we don't use that format. We have a 24-hour clock format i.e. 14:52 instead of 2:52 PM.

    Can I change the time format of incoming mails, in Mail? Now I have AM/PM, but I live in Denmark where we don't use that format. We have a 24-hour clock format i.e. 14:52 instead of 2:52 PM.

    Is the time format of your Mac in 24 hour?

  • Change time format to 24 hours

    Dear Experts,
    In  my webdynpro application I have a requirement where I have to use a 24 hr time format, but by default it is shown as 12 hr format, because of the language in portal.
    And I only want to change the format in this application only, not of all the portal.
    Please suggest.
    Warm Regards,
    Upendra Agrawal

    Hi Upendra,
    Assign the value from backend to the newly created attribute of type new simple type. This will convert it to the 24 hrs format
    OR
    if you get the date from backend,
    Try using a date formatter.
      String s;
      Format formatter;
      Date date = // Your date value from the backend.
      formatter = new SimpleDateFormat("HH.mm.ss");
      s = formatter.format(date);
    This will give the time in 24 hrs in the variable 's'.
    Pls try this and let me know.
    Thanks and Regards,
    Shyam.
    Edited by: Shyam Gopal on Jul 28, 2010 3:05 PM

  • Display value in hh:mm time format in SSRS Report

    Hi Everybody,
    I have an SSRS report where one of the column is sum of time values. When I do the summation, the values are coming in this format. In the last column the minute value is getting displayed more than 60. How can I format it to proper time format as hh:mm
    so that it displays as "08:15" . The expression which I am using is "  Sum(CDec(FormatNumber(Fields!Overtime_Hours.Value,2)),"Month"). Your help would be highly appreciated.
    January
    31/1/2014
    21/04/2014
    00:00
    07:75
    00:00
    07:75
    Thanks & Regards,
     RPC
    Regards RCP

    Hi RPC24,
    According to your description, you can calculate the correct value of time summation. Now you want to make the result into proper time format (hh:mm). Right?
    In this scenario, we can convert the time into string type, split the string based on delimiter ":" and convert each part into integer. Then do the calculation for each part and set the hour increase 1 every 60 minutes (we can adjust in expression).
    We have tested this case in our local environment. Here are screenshots for you reference:
    1. The report design looks like below:
    A: =Format(TimeValue(Fields!StartTime.Value.ToString),"hh:mm")
    B:=CStr(SUM(CInt(split(CStr(Format(TimeValue(Fields!StartTime.Value.ToString),"hh:mm")),":")(0)))+SUM(CInt(split(CStr(Format(TimeValue(Fields!StartTime.Value.ToString),"hh:mm")),":")(1)))\60)+":"+CStr(SUM(CInt(split(CStr(Format(TimeValue(Fields!StartTime.Value.ToString),"hh:mm")),":")(1)))
    Mod 60)
    Ps: In this sample, we used Time data type. You may need to do some modification in your expression based on the data type of the time data field.
    2. The result looks like below:
    Reference:
    Summing the Value of HH: MM: SS In SSRS
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Can't set the time format of lockscreen BACK to 24H format

    Having switched from 24 to AM/PM 12 hour format to see what it looked like, upon switching it back to 24 hour it's fine on the Home screen but remains stubbornly 12 hours on the lockscreen. It's an iPhone 4 running IOS 5.0
    Thanks

    Same issue here. 12 hour time toggled in settings but I've noticed 24 hour time on lock screen and in iCal. 12 hour on home screen. Did you find a solution?

  • 24 Hour times in iCal

    Just a query......does anyone know how to make the timing based on a 24h clock (I just hate AM/PM because my work is 24h shift based).
    Cheers HyperDoc

    This is a goofy Mac OS X 10.4 thing.
    Launch System Preferences and open the International preference pane in the Personal panel. Press the Formats tab and then the Customize… button in the center, under the Times section.
    Under the Show: Short menu, you should see two values listed, the first representing hours, and the second representing minutes. If you click on that first value, you should see a downward-facing triangle. Press it to drop-down a menu on the right hand side of the value, and select the 01-24 format choice. Press the OK button, and quit.
    iCal should display 24 hour times from that point on, though some users—all or most using releases prior to version 2—indicating that existing event times don't shift to 24 hour representation. All of mine did.

Maybe you are looking for

  • Application not working

    Last night I downloaded some browsers to try some new ones. Today, my printer doesn't appear to receiving info and my creative suite photoshop application won't open. My adobe acrobat (professional) also won't open. Tried disc first aid. Didn't work.

  • Parsing XML data stored as CLOB in DB and save attribute values in table

    Hello, I have a CLOB column in table that is holding XML data as follows, <banners> <banner-image id="0"> <type>BANNER</type> <local-path>http.gif</local-path> <click-through-url>www</click-through-url> <make>Acura</make> </banner-image> <banner-imag

  • After Effects Availability in Application Manager

    After Effect does not appear in my adobe application manager. How can I make it available to Install?

  • N+1 5508 WLC failover test

    Good day all, I have a question about the N+1 5508 failover test: Should I shutdown one of the primary WLC to test failover? I just setup the N+1 bakcup WLC (5508). B Based on: http://www.cisco.com/en/US/docs/wireless/technology/hi_avail/N1_High_Avai

  • Can I extend my Apple Care?

    My apple care is about 2.5 years old and is about to expire. Is there a way to extend Apple Care for 'X' number of years?