Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "David Owen" <dowen at midsomer dot org>
Subject: Re: Dates are returned incorrectly
Date: Jun 21 2000 2:55AM

>>>>> "Rappal" == Rappal Vaidyanathan  writes:

    Rappal> Hi, I am trying to connect to a SQL Server 7.0 database using
    Rappal> DBI and DBD::Sybase 0.22.  When I do a "select getdate()", the
    Rappal> dates returned are not correct.  I get dates with years ranging
    Rappal> from 1900 to 9999.

    Rappal> Any input on this will be greatly appreciated.

I am not sure if this is a known problem, but there is definitely a bug in
the MS SQL Server 7 implementation of TDS.  The way I got around this was
convert the date to a string on the server side.  This could be a pain if
you have a lot of dates.  This definitely happens with all releases of SQL
Server 7 that I tried, inc SP2.


David Owen     Midsomer Consultants Inc.
Maintainer of the Sybase FAQ: