Check time

C

chivesthecat

Is there a way to check if a Date value has past n hours where n is a
variable integer?
 
L

Luc The Perverse

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,270
Messages
2,571,102
Members
48,773
Latest member
Kaybee

Latest Threads

Top