Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2006

Tip: Looking for answers? Try searching our database.

Check time

Thread view: 
chivesthecat@gmail.com - 19 Nov 2006 04:03 GMT
Is there a way to check if a Date value has past n hours where n is a
variable integer?
Luc The Perverse - 19 Nov 2006 04:26 GMT
> Is there a way to check if a Date value has past n hours where n is a
> variable integer?

You mean you have some integer X which represents an hour in a day and you
want to take a date and find out if it is past that specific hour?

Of course :)

But are we just looking at hours?

eg:

So 3:00:00 is not past X=3 so return false

but 3:00:01 is past X=3 - do we return true, or are we ignoring everything
after the hour?

You might want to change your restriction to greater than or equal to, in
case you want to set it to the 0th hour.

--
LTP

:)


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.