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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:23:02+00:00 2026-05-23T14:23:02+00:00

I am working on simple application to show the time in different formate. To

  • 0

I am working on simple application to show the time in different formate. To show the time I am displaying ISO country code using this ISO code. Can I able to change time in that ISO country format?

I have written code as follows

TelephonyManager tMgr = 
    (TelephonyManager)getApplicationContext().getSystemService(
        Context.TELEPHONY_SERVICE);

String iso = tMgr.getNetworkCountryIso();
Log.v("Device iso", "=======>" + iso);
String mbNo = tMgr.getLine1Number();
Log.v("mbNo", "=======>" + mbNo);

Here I am getting iso as US. Can I show the current system time format in US time format?

I have used Date class to show time as follows

DateFormat df = DateFormat.getTimeInstance();
systime = df.format(new Date());

It is displaying time in HH:MM:SS AM/PM format. I would like to display the above time as US format.

How can I display the time in US or any other format?

  • 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-23T14:23:03+00:00Added an answer on May 23, 2026 at 2:23 pm

    In your case I think you could use

    Date systemDate = Calendar.getInstance().getTime(); // the current system time
    DateFormat df = DateFormat.getDateTimeInstance(DateFormat.SHORT,DateFormat.SHORT, Locale.US);
    Date myDate = df.format(systemDate);
    

    Or to use custom format

    SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
    Date myDate = sdf.format(systemDate);
    

    if you have a string use parse

    Date myDate = sdf.parse("29/04/1980 12:30:24");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a simple chat application using a System.Windows.Forms.WebBrowser Control to display
I am currently working on a simple web application through Google App engine using
I have a simple application which was working fine until I added some code
I'm working on a simple application to start learning my way around WPF. I
I'm working on a simple application that draws an alpha-blended picture on the screen's
I'm working on a simple flex / AIR application with just a mx.TextInput control
I'm working on making a simple server application with python, and I'm trying to
I am working on a pretty simple web application (famous last words) and am
I'm working on a simple search engine for a newspaper application. When the user
I am working on a simple app tab-bar based application that has two views.

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.