Prev: PIVOT with dynamic where clause (how to)
Next: OLE DB provider "SQLNCLI" for linked server "(null)" returned message "Unspecified error".
From: Plamen Ratchev on 16 Mar 2010 13:29 Not sure why you use this date format. If you wan tot use it then you have to use CONVERT with appropriate style: SELECT DATEADD(DAY, DATEDIFF(DAY, 0, CONVERT(DATETIME, '18/01/2010 23:00:00', 103)), 0); But better to simply use language independent date format string: SELECT DATEADD(DAY, DATEDIFF(DAY, 0, '20100118 23:00:00'), 0); -- Plamen Ratchev http://www.SQLStudio.com |