freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "James K. Lowden" <jklowden AT speakeasy.org>
- To: TDS Development Group <freetds AT franklin.oit.unc.edu>
- Subject: Re: datetime format
- Date: Sun, 16 Dec 2001 20:11:05 -0500
Bradley Bell wrote:
>
> Hi, when selecting a datetime value using freetds, I get values such as:
> "Dec 13 2001 05:58PM"
> Whereas the same select statement in the MS SQL Query analyzer give:
> "2001-12-13 17:58:55.000"
>
> Since I need to be able to convert back and forth between datetime values
> and unix timestamps, I need to at least have the number of seconds
> (millisecs don't matter).
>
> Is this a problem in FreeTDS, or a limitation of the TDS protocol, or what?
> Is it possible to make FreeTDS always return the number of seconds in
> datetime fields?
Brad,
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.
To illustrate, try Microsoft's isql command-line tool. I think you'll
find it represents datetimes the way, say, sqsh does.
> (I don't want to use CONVERT, because the select statements in this
> application should remain portable)
If the server is consistent (always MS SQL Server or Sybase), the most
portable way probably *is* to coerce the format with convert.
Regards,
--jkl
-
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
Archive powered by MHonArc 2.6.24.