db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bernard.n...@vallourec.fr
Subject Réf. : date fields / oracle
Date Mon, 09 May 2005 14:36:34 GMT

You can use TIMESTAMP instead of DATE

<column name="LAST_LOGIN"  type="TIMESTAMP"/>



                                                                                         
                          
                    Roel van Dijk                                                        
                          
                    <rdvdijk@gmai        Pour :  Apache Torque Users List <torque-user@db.apache.org>
              
                    l.com>               cc :                                         
                             
                                         Objet :      date fields / oracle               
                          
                    09/05/2005                                                           
                          
                    16:19                                                                
                          
                    Veuillez                                                             
                          
                    répondre à                                                         
                            
                    "Apache                                                              
                          
                    Torque Users                                                         
                          
                    List"                                                                
                          
                                                                                         
                          
                                                                                         
                          




I'm using Torque as part of Apache Jetspeed, and was wondering about
date fields. I've created a custom table, which has a column
declaration like this:

<column name="LAST_LOGIN"  type="DATE"/>

Then I do this in my Java code:

Date now = new Date();
entry.setLastLogin(now);

My Oracle (9) database now has this entry:
2002-05-09 00:00:00

As you can see, the time has not been stored. Is there a way to fix
this? (is there something like a datetime type?)

As a sidenote, where can I find a list of the available column types
that I can use in my XML schema?

--
Roel -- rdvdijk@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message