Solved

Get hour from specify time

Posted on 2004-04-08
2
198 Views
Last Modified: 2010-03-31
My code:

Time currentTime = null;

then i will set the time to a value, then how can i get the hour of the time?

thanks
0
Comment
Question by:Kennywen
2 Comments
 
LVL 92

Accepted Solution

by:
objects earned 25 total points
ID: 10781765
Calendar c = Calendar.getInstance();
c.setTime(time);
int h = c.get(Calendar.HOUR);
0
 

Author Comment

by:Kennywen
ID: 10781792
Object can u help me to view on my existing question:

http://www.experts-exchange.com/Programming/Programming_Languages/Java/Q_20947248.html

thanks
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
count8 challlenge 13 86
groovy example issue 10 67
ArrayIndexOutOfBoundException 9 35
Groovy:unable to resolve class error 2 31
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

757 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

17 Experts available now in Live!

Get 1:1 Help Now