Getting seconds from a datetime field

James K. Lowden jklowden at speakeasy.org
Tue Jul 2 01:19:30 EDT 2002


On Mon, 1 Jul 2002 16:01:01 -0600, "Dan Harris"
<coronadh at coronasolutions.com> wrote:

> I'm stuck trying to get seconds in a resultset containing a date/time
> field.  Every time it's returned I only get down to the minutes.  Somone
> posted a way to do this some months ago but I can't find it.

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

HTH.

--jkl



More information about the FreeTDS mailing list