📜  sql server datetime - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:05.660000             🧑  作者: Mango

代码示例1
DECLARE @date date = '12-21-16';  
DECLARE @datetime datetime = @date;  
  
SELECT @datetime AS '@datetime', @date AS '@date';  
  
--Result  
--@datetime               @date  
------------------------- ----------  
--2016-12-21 00:00:00.000 2016-12-21