• David Burrows (8/29/2014)


    Your query is returning a date datatype, the gui interface (SSMS) is displaying as characters formatted as to the language of the login.

    So

    SELECT CONVERT(DATE,GETDATE()) AS CurrentDate;

    and

    SELECT CONVERT(varchar(10),GETDATE(),120) AS CurrentDate;

    Both show 2014-08-29 in SSMS but the first is a date datatype and the second is varchar (string) and will be treated differently depending on what software is used.

    Thanks for the tip.

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/