Get and update only Time part from 'DateTime' data type field

From: Kumar (Kumar_at_discussions.microsoft.com)
Date: 09/13/04


Date: Mon, 13 Sep 2004 06:45:01 -0700

Can you give me a SQL syntax or query to select only 'Time' portion from a
table column which is defined as 'datetime'. ( 8 char length)

Also, I need to update this field (same table) with only time part.

e.g: '2004-04-15 17:45:30.0000' (Existing value in the table column)
                     '05:45:30 PM' (Required value in the same table coumn
after update)

Cheers..



Relevant Pages

  • query question
    ... I just started to work with sql server 2000. ... against "datetime" columns in the sql server 2000 database. ... Be able to access the date portion only. ... What kind of query statements would I need to write, ...
    (microsoft.public.sqlserver.fulltext)
  • sql server 2000
    ... I just started to work with sql server 2000. ... against "datetime" columns in the sql server 2000 database. ... Be able to access the date portion only. ... What kind of query statements would I need to write, ...
    (microsoft.public.sqlserver.mseq)
  • Re: SQL Query problem take ages to run
    ... When you run the select query, how long does it take to start returning ... with few if any duplications in the parent table, ... PtNo char NOT NULL, ... Adm_Unit_Dt datetime, ...
    (microsoft.public.sqlserver.programming)
  • Re: Calculate time lapsed between two records
    ... Dear Tom: ... The DateTime field is not blank. ... When I tried it with alias table technique referring to the same tbltest1 as ... > I believe you will need to run this query based solely on the table in which ...
    (microsoft.public.access.queries)
  • Re: Combo offset
    ... using acDialog temporarily sets the popup property to true so you don't need ... Jeanette Cunningham ... both forms are bound to the same query. ... [1Dropped portion] ...
    (microsoft.public.access.formscoding)