Make your own free website on Tripod.com

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]

Re: InstantDB: Datetime issue


Hi, Wilfred --

The problem is probably your format mask in the database
property file.  You say: "My property file has
dateTimeFormat set to "yyyy-mm-dd hh:mm:ss.lll".  Notice
that you're using the same abreviation for months as for
minutes, "mm"?  Minutes should be "nn".  See this in the
archive, discussing how the sample.prp file in v3_25
contains this error:
http://instantdb.enhydra.org/project/mailingLists/instantdb/msg01033.html

Change your dateTimeFormat to "yyyy-mm-dd hh:nn:ss.lll"
and I bet all will be well ...

Regards,
Bill Graham



Quoting Wilfred Leung <wilfredleung@earthlink.net>:

> 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
>
>
>
> 


=========================================
This mail sent through Sinclair's WebMail
      http://mail.sinclair.net

-----------------------------------------------------------------------------
To unsubscribe from this mailing list, send email to majordomo@enhydra.org
with the text "unsubscribe instantdb" in the body of the email.
If you have other questions regarding this mailing list, send email to
the list admin at owner-instantdb@enhydra.org.