KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
SQL Server 2008 is not doing what I expected with DateTime . It doesn't let me set DateTime variables, no matter what date format I use. When I execute: DECLARE @Test AS DATETIME SET @Test = 2011-02-15 PRINT @Test I get an output of: Jun 18 1905 12:00AM I've checked all of the regional settings that I can find & it all appears okay. I've also tried setting the DateTime to various literal alternatives, such as '15/02/2011', '2011-02-15 00:00:00', etc.
Tags (comma-separated)
Save Edits
Cancel