Reputation: 139
Why am I getting this: 1905-06-28 00:00:00.000 as a result of the following query.
declare @report_date datetime set @report_date = 2013-1-8 select Convert(varchar(24),@report_date, 21)
Upvotes: 0
Views: 681
Reputation: 3036
2013-1-8 = 2004 (parsed as days from 1900-01-01)
set quotes
Upvotes: 3