Re: work with date and hour

Tobias Downer <[email protected]> Wed, 02 Mar 2005 14:56:20 -0800
Newsgroups gmane.comp.db.mckoi
Message-ID <[email protected]>
Hi Carlos,

I suggest you use the TimeStamp object instead of a separate time and 
date column, because a time stamp contains both time and date in one object.

You need to perform the calculation for the timestamp of (now + 1 hour) 
on the client.  I suggest using the java.util.Calandar object to help 
with this.  When you have created the TimeStamp object, you can use a 
PreparedStatement to query the database and find all records >= this time.

Toby.

[email protected] wrote:
> 
> Hello,  
>   
>   I have one  doubts simple, but I don't get to find the solution:   
>   
>    1 - do I have a table with following structure, in this table I do
> need to work with date and hour, type a calendar to determine the
> program will be executed, as I can make this selection?
> 
>     2 - as I do to select one hour >= the current hour?
> 
> 
>         Table:
> 
>                 agenda
>                          (hora time,
>                           data date)


---------------------------------------------------------------
Mckoi SQL Database mailing list  http://www.mckoi.com/database/
To unsubscribe, send a message to [email protected]