set @report_date = ‘2013-01-17 00:00:00‘;
select @report_date;
set @report_date = cast(‘2013-01-17 00:00:00‘ as datetime);
SELECT @report_date;
DECLARE dattime DATETIME DEFAULT ‘2013-10-10‘;
SELECT dattime FROM DUAL;
原文:https://www.cnblogs.com/tonggc1668/p/14802814.html