freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Winkless, Geoff" <geoff.winkless AT pera.com>
- To: 'TDS Development Group' <freetds AT franklin.oit.unc.edu>
- Subject: Re: datetime format
- Date: Mon, 17 Dec 2001 09:34:12 -0000
James K. Lowden wrote:
> MS SQL Query Analyzer is an ODBC tool. It's default datetime
> display is controlled by some ODBC settings. I don't know
> the details.
No it's not. It's specifically for MS SQL Server - basically it's the
updated version of isql/w. You're probably thinking of MS Query, the crappy
thing that comes with Office.
> If the server is consistent (always MS SQL Server or Sybase), the most
> portable way probably *is* to coerce the format with convert.
The best way is to use the standard ANSI format and fit your code around it.
You may find that you need to put
SET DATEFORMAT YMD
in front of your queries though because MS in their infinite wisdom decided
that if you're in a country (eg Europe) which has its normal date format as
dd/mm/yy as opposed to mm/dd/yy (a la USA) SQL Server automatically switches
round day and month even in formats which are -defined- as non-changeable -
so if you set SQL up with (eg) a UK locale it actually returns ANSI dates as
YYYY-DD-MM (eurgh).
Geoff
-
datetime format,
Bradley Bell, 12/13/2001
- <Possible follow-up(s)>
- Re: datetime format, James Cameron, 12/13/2001
- Re: datetime format, James K. Lowden, 12/16/2001
- Re: datetime format, Winkless, Geoff, 12/17/2001
- Re: datetime format, Lowden, James K, 12/17/2001
- Re: datetime format, Bradley Bell, 12/17/2001
- Re: datetime format, James Cameron, 12/17/2001
- Re: datetime format, Michael Peppler, 12/17/2001
- Re: datetime format, James K. Lowden, 12/18/2001
- Re: datetime format, Steve Langasek, 12/19/2001
- Re: datetime format, Brian Bruns, 12/19/2001
- Re: datetime format, Franck Martin, 12/19/2001
- Re: datetime format, Steve Langasek, 12/19/2001
- Re: datetime format, Bradley Bell, 12/19/2001
Archive powered by MHonArc 2.6.24.