Skip to Content.
Sympa Menu

freetds - RE: jdbc dates dateformat problem

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Rajkumar Seth <Seth.Rajkumar AT GNI.co.uk>
  • To: 'TDS Development Group' <freetds AT franklin.oit.unc.edu>
  • Subject: RE: jdbc dates dateformat problem
  • Date: Fri, 3 Aug 2001 11:28:19 +0100


Both Java and MSSQLServer support datetime as unix longs so you this?

-----Original Message-----
From: Rafel Puchades [mailto:rpuchadm AT cfp.upv.es]
Sent: 2001 August 02 09:15
To: TDS Development Group
Subject: [freetds] jdbc dates dateformat problem


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

---
You are currently subscribed to freetds as: [Seth.Rajkumar AT GNI.co.uk]
To unsubscribe, forward this message to
$subst('Email.Unsub')


************************************************************************
The contents of this message and any attachments are confidential and
are intended solely for the attention and use of the addressee only.
Information contained in this message may be subject to legal,
professional or other privilege or may otherwise be protected by other
legal rules. This message should not be copied or forwarded to any other
person without the express permission of the sender. If you are not the
intended recipient you are not authorised to disclose, copy, distribute
or retain this message or any part of it.

If you have received this message in error, please notify the sender by
telephone (+44-20-7002-4000) and destroy the original message.

We reserve the right to monitor all e-mail messages passing through our
network.
************************************************************************




Archive powered by MHonArc 2.6.24.

Top of Page