Skip to Content.
Sympa Menu

freetds - Re: Getting seconds from a datetime field

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Eric Deutsch" <edeutsch AT systemsbiology.org>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: Getting seconds from a datetime field
  • Date: Tue, 2 Jul 2002 09:36:19 -0700



Hi Dan, if you have a recent version of FreeTDS (something later than
the original 0.53 release itself), you should be able to fix this simply
by adjusting your /usr/local/freetds/etc/locales.conf file to read
something
like:

[default]
date format = %Y-%m-%d %H:%M:%S

[en_US]
date format = %Y-%m-%d %H:%M:%S
language = us_english
char set = iso_1

If you don't already have such a file (it might be in a different
location than mine), you probably need to upgrade to the latest version
which will include such a file in the distribution.

Hope this works for you,
Eric


> -----Original Message-----
> From: Dan Harris [mailto:coronadh AT coronasolutions.com]
> Sent: Tuesday, July 02, 2002 9:25 AM
> To: TDS Development Group
> Subject: [freetds] Re: Getting seconds from a datetime field
>
> No, it's a datetime type. When I select it, it returns a format of
>
> Jun 1 2002 12:01AM
>
> I would rather have:
>
> 2002-06-01 00:01:34
>
> I have tried cast and convert(varchar, colname) but nothing seems to
> return
> seconds.
>
> -Dan
>
> On Monday 01 July 2002 10:19 pm, you wrote:
>
> > Dan,
> >
> > Are you using smalldatetime? It lacks seconds and milliseconds.
> >
> > If you're thinking of cast/convert, see
> > http://www.SchemaMania.org/jkl/booksonline/SQLBOL70/html/ca-co_1.htm
>
>
> ---
> You are currently subscribed to freetds as:
[edeutsch AT systemsbiology.org]
> To unsubscribe, forward this message to leave-freetds-
> 127899P AT franklin.oit.unc.edu




Archive powered by MHonArc 2.6.24.

Top of Page