Skip to Content.
Sympa Menu

freetds - Re: New build warnings; datetime 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: Re: New build warnings; datetime format issue
  • Date: Tue, 28 May 2002 11:45:56 -0400


Hmmm. I kind of thought this would happen. My fault I'm afraid, but let me
explain...

FreeTDS conversion routines (dbconvert in db-lib for example) used to
convert a date to the string format "Jan 1 1800 12:00AM".

However, I discovered that the real dbconvert routine ( in Sybase's db-lib
) would output in the format "Jan 1 1800 12:00:00:000AM" , so I changed
our version to do the same thing. This was kind of a byproduct of my BCP
work. In a bcp character output file a date gets represented in the latter
format, and I needed to reproduce this. This led me to completely overhaul
the date/time conversion routines, which I now think are pretty good. We
can handle dates from 1753 thru 9999 , and also do milliseconds.

My guess is that sqsh or isql doesn't simply print the output of the
dbconvert routine, but post-formats the output, or uses dbdatecrack to
give a "user-friendly" output - sans the seconds and milliseconds.

I did agonize about this - in the knowledge that what I coded may have
adverse effects on FreeTDS users, but at the end of the day, I decided to
faithfully replicate the behaviour of dbconvert in Sybase open client...

I've kept an eye on numerous posts about date/time formats on the forum,
and could see this issue was going to be a big one, I guess this one will
run and run....

Bill





Archive powered by MHonArc 2.6.24.

Top of Page