Skip to Content.
Sympa Menu

freetds - Re: date type in ms sql 7.0

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Bob Kline <bkline AT rksystems.com>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: date type in ms sql 7.0
  • Date: Tue, 3 Oct 2000 18:33:56 -0400 (EDT)


On Wed, 4 Oct 2000, James Cameron wrote:

> Bob Kline wrote:
> > 1. Chop off the part you don't want; or
> > 2. Use the CONVERT function with the style you want.
>
> Given that I want the seconds and can't seem to get them, how would I
> use CONVERT to get them?

This is a different question than the original poster asked, as he
wanted the date part but not the time. The unfortunate fact is that
Microsoft has seen fit to omit the standard's DATE and TIME data types
from its implementation of SQL. In your case, you can use style value 8
(or 108) to get back a string in the form hh:mm:ss. If you *only* want
the seconds (for whatever reason), you should look at using the DATEPART
function.

--
Bob Kline
mailto:bkline AT rksystems.com
http://www.rksystems.com





Archive powered by MHonArc 2.6.24.

Top of Page