Skip to Content.
Sympa Menu

freetds - Re: M$ SQL 7, again ;-)

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Michael Peppler <mpeppler AT peppler.org>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: M$ SQL 7, again ;-)
  • Date: Fri, 10 Sep 1999 07:32:25 -0700 (PDT)


Paul Schaap writes:
> Hi,
>
> I have a fairly recent CVS freetds which has the following two issues :-
>
> 1) With both php and sqsh dates come through incorrectly, i.e.
> 1> SELECT ID,DateAdded FROM Customer WHERE ID > 10001434
> 2> \go
> ID DateAdded
> -------- -------------------
> 10001435 Aug 11 1903 06:51AM
> 10001436 Aug 30 1903 06:51AM
> 10001437 Nov 25 1903 06:51AM
>
> (3 rows affected)
> 1> SELECT ID,CONVERT(CHAR(20),DateAdded) FROM Customer WHERE ID > 10001434
> 2> \go
> ID
> -------- --------------------
> 10001435 Sep 10 1999 9:32PM
> 10001436 Sep 10 1999 9:51PM
> 10001437 Sep 10 1999 11:18PM
>
> (3 rows affected)
> I resolve this by doing a CONVERT right now ! Any ideas how it could be
> fixed ?

Looks like the first and second word of the DATETIME value are swapped
on MSSQL7... Remember that a datetime is a struct with two 32bit int
values, one for days since Jan 1 1900, and one for 300th of seconds
since midnight.

Michael
--
Michael Peppler -||- Data Migrations Inc.
mpeppler AT peppler.org -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com
Sybase on Linux mailing list: ase-linux-list AT isug.com




Archive powered by MHonArc 2.6.24.

Top of Page