Home Forums SQL Server 2005 T-SQL (SS2K5) Changing the default date format of SQL server 2005 RE: Changing the default date format of SQL server 2005

  • sarvesh singh (7/22/2009)


    When i do rt click properties on SQL server it says language spanish.

    When i run a query :

    select * from shifthistory where vfrom='2009-07-23 00:00:00'. i get an error.

    but when i use

    select * from shifthistory where vfrom='23-07-2009 00:00:00' It works.

    If i just run select * from shifthistory It give me a result of vfrom as '2009-07-23 00:00:00' but when i use this date in the where clause it errors.

    Does this work?

    select * from shifthistory where vfrom = convert(datetime, '2009-07-23 00:00:00', 120)