Java: Calendar class: Time: Wed Aug 15 13:40:29 MST 2012 -> how do I remove Wed Aug 15 from my time?

Posted on 2012-08-15
Last Modified: 2012-08-15
Hello Experts,

The code below,

Calendar calendar = Calendar.getInstance();
		Date time = calendar.getTime(); 	
		System.out.println("Time: " + time );

Open in new window

Time: Wed Aug 15 13:40:29 MST 2012

How do I set or remove: Wed Aug 15.... and MST 2012
I want my time to be set as: 13:06:10.903

In advance, thanks for your help...

Question by:epifanio67
    LVL 16

    Accepted Solution

    See SimpleDateFormat.

    Author Closing Comment

    Thank you...
    LVL 16

    Expert Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
    For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
    This video teaches viewers about errors in exception handling.
    This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now