Getting seconds from a datetime field
Lowden, James K
LowdenJK at bernstein.com
Tue Jul 2 13:46:31 EDT 2002
> 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
More information about the FreeTDS
mailing list