Skip to Content.
Sympa Menu

freetds - RE: date format in ODBC

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: "'TDS Development Group'" <freetds AT franklin.metalab.unc.edu>
  • Subject: RE: date format in ODBC
  • Date: Wed, 31 Jul 2002 17:30:44 -0400


> From: Bill Thompson [mailto:thompbil AT exchange.uk.ml.com]
> Sent: July 31, 2002 11:31 AM
>
> I would like to know the string format that is returned from
> the ODBC api,
> when a datetime column is bound to a character variable (SQL_C_CHAR)

Bill,

Here is the behavior on NT with MS's tool:

$ osql -E -S spquant -Q"select getdate()"

-----------------------
2002-07-31 17:19:01.797

(1 row affected)

I think the driver (but maybe the tool) has a gadget to "use regional
settings". AFAIK it can't be engaged from osql.

IMHO, everyone should be aping MS on this one, as the default behavior is
(as far as I can tell) not specified in the user documentation, and MS
controls the definition of ODBC.

When we get fancier with locales, we'll want to be more subtle with
locale-based formatting of date, time, and money. I think it should track
languages, because I think anything good enough for iconv is a unique index
into the "correct" format for this stuff. That's what Sybase did, if I
understood their docs.

Regards,

--jkl


The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the
original message. Please note that for certain accounts we do not accept
orders and/or instructions by e-mail, and for those accounts we will not be
responsible for carrying out such orders and/or instructions. Kindly refrain
from sending orders or instructions by e-mail unless you have confirmed that
we accept such communications for your account. Please also note that to
satisfy regulatory requirements we review the outgoing and incoming e-mail
correspondence of staff members serving certain functions.






Archive powered by MHonArc 2.6.24.

Top of Page