[dba-SQLServer] Getting rid of time in result set

Stuart McLachlan stuart at lexacorp.com.pg
Wed Oct 27 22:12:50 CDT 2004


On 27 Oct 2004 at 22:51, John W. Colby wrote:

> How do I get rid of the time in a date column in the result set?
> 
> 2005-01-02 00:00:00.000
> 
> Should be
> 
> 2005-01-02
> 

Convert (myDate,nvarchar(10),10)

The third parameter "Style"  defines the formatting

10 = 2005-01-02
110 = 05-01-02
etc



-- 
Stuart





More information about the dba-SQLServer mailing list