Skip to Content.
Sympa Menu

freetds - jdbc dates dateformat problem

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Rafel Puchades" <rpuchadm AT cfp.upv.es>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: jdbc dates dateformat problem
  • Date: Thu, 2 Aug 2001 04:15:09 -0400


I have problems with dates doing a Web oriented Java aplication.
I'm using freetds with SQLServer 7, winNt, Java 1.3 and Tomcat321.
I'm using sql2java so I'm always using prepared statements.
When I read data everything is OK but when I write data using a pstmt
dates are almost correct but not correct. I'll try to explain...

One date, for instance 12/08/01 20:31
Two dateformats, df1 which timezone is Spain, and df2 which timezone is
GMT
When I read dates that's what happens:
SQL7(20:31) -df1.parse- JAVA(18:31) -df1.format- WEB(20:31)
That's how I Should write dates:
WEB(20:31) –df1.parse- JAVA(18:31) -df1.format- SQL7(18:31)
That's what really happens:
WEB(20:31) –df1.parse- JAVA(18:31) -df2.format- SQL7(20:31)
And that's what I must do to middle-solve the problem:
WEB(20:31) –df2.parse- JAVA(20:31) -df2.format- SQL7(20:31)

As you must think dateformats between WEB and JAVA are under my control,
but dateformats between SQL7 and JAVA are part of the freeTds Jdbc Driver.

Please help me; I think the driver is not working in a coherent way, is
it?
THANK YOU




Archive powered by MHonArc 2.6.24.

Top of Page