InstantDB Project
About InstantDB
Project Mail Lists
Short History
Reporting Bugs
Screen Shots
3rd Party Examples
FAQs

Software
Downloads
Documentation
CVS Repositories
Roadmap
License

About Enhydra.org
Who We Are
News, Articles & Events
Getting Involved
Contact Us

Community
Demos
Contributions
Resources
Case Studies
On The Edge! -NEW-
Commercial Vendors


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

InstantDB: Datetime issue


Hi,
 
I've inserted a timestamp into a datetime column.  What I noticed is that the minute field remains at 01 regardless of the actual time.  So if I insert a timestamp such as "2001-01-12 15:50:35.118", I will get "2001-01-12 15:01:35.118" from a simple select.  I tried running "SELECT TO_DATE(date_COL, "hh:nn:ss dd:mm:yyyy")" and it did return correctly as "15:50:35 12:01:2001".  My property file has dateTimeFormat set to "yyyy-mm-dd hh:mm:ss.lll".  Any idea what's wrong?  See below for code to how I insert the datetime value.
 
    java.util.Date uDate = new java.util.Date();
    myStatement = c.createStatement();
    myStatement.execute("drop table t1");
    myStatement.execute("create table t1 (date1 DATETIME NULL)")
    myStatement.execute("insert into t1 (date1) values (\"" + new Timestamp(uDate.getTime()) + "\")");
 
Thanks,
 
Wilfred