• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 332
  • Last Modified:

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

Hello Experts,

The code below,

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

Open in new window


returns:
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...

Regards,
0
epifanio67
Asked:
epifanio67
  • 2
1 Solution
 
krakatoaCommented:
See SimpleDateFormat.
0
 
epifanio67Author Commented:
Thank you...
Regards,
0
 
krakatoaCommented:
Pleasure.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now