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: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Help with SQL Server 7 and datetime
Date: Sep 18 2000 3:15PM

umesh@DBNA.COM writes:
 > I am in the process of upgrading from SQL server 6.5 to 7 and run into
 > a problem with datetime columns after upgrading my database. If I
 > "select" a column containing today's date, I get the date as "Jan 1
 > 1900". The result is correct if I use the convert function.
 > This tells me that while the server has the right date, the
 > isql/sybperl programs are interpreting data incorrectly. Is there any
 > way to avoid the problem without changing the code on the client side?

The problem is that MS-SQL has changed the protocol, and screws up the 
data for datetime values.

There isn't really anything I can do - I use the Sybase OpenClient
convert functions to handle things...

You can use convert(), or you can use the FreeTDS libraries to build
sybperl (FreeTDS has a special switch for this, I think).

Michael Peppler         -||-  Data Migrations Inc.    -||-
Int. Sybase User Group  -||-
Sybase on Linux mailing list: