Skip to Content.
Sympa Menu

freetds - A new contribution to the Date Format issue.

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Bill Thompson" <thompbil AT exchange.uk.ml.com>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: A new contribution to the Date Format issue.
  • Date: Wed, 2 Jan 2002 10:23:00 -0500


Hi Everyone - hope you all had a good holiday!

I've got a contribution to the date format issue. Rather than lose my two
pennyworth in the previous thread I thought I'd start one of my own!

First off, I am using the FreeTDS db-lib functions and am testing against
both Sybase and SQL server 2000. I am also using the sybase db-lib to
check results / behaviours.

Against Sybase, the dbconvert function behaves as follows . I have used
the sybase example program to compare the behavior of Sybase db-lib vs.
FreeTDS 5.2 db-lib.

the following call to dbconvert was used...

dbconvert(DBPROCESS *)NULL, SYBDATETIME, &my_date,
(DBINT)-1, SYBCHAR, my_string, (DBINT)-1);

This produced the following string:

Nov 11 1955 12:00:00:000AM

Which includes the seconds and milliseconds.

The equivalent in FreeTDS 5.2 produces the following:

Nov 11 1955 12:00AM

I have a problem with changing this however. as all the conversion code is
in the TDS layer, rather than the dblib layer. If I change
src/tds/convert.c to my satisfaction, aren't I likely to mess things up
for the other API's (ctlib, odbc, etc ) ?


best wishes,

Bill






  • A new contribution to the Date Format issue., Bill Thompson, 01/02/2002

Archive powered by MHonArc 2.6.24.

Top of Page