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: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: "'TDS Development Group'" <freetds AT franklin.metalab.unc.edu>
  • Subject: Re: Getting seconds from a datetime field
  • Date: Tue, 2 Jul 2002 12:46:31 -0400


> From: Dan Harris [mailto:coronadh AT coronasolutions.com]
> Sent: July 2, 2002 12:25 PM
>
> 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

Dan,

Ah, you mean http://www.freetds.org/faq.html#dateformat. I should include
an example.

You can coerce the date format with something like this:

1> select convert( varchar(30), getdate(), 120 ) as Now
2> go
Now
------------------------------
2002-07-02 12:36:31

Or of course you can follow Eric's suggestion in locales.conf.

Regards,

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page