关于日期字段问题?
我有一个表中有一个字段datetemp   类型为   datetime   我用程序将它清空为 ' '后,但用程序读出这个字段显示为 "1900-01-01   00:00:00.000 "这是什么原因呀。
------解决方案--------------------datetime 的空就是 '1900-01-01 00:00:00.000 '     
 Declare @T Table(ID Int, datetemp DateTime) 
 Insert @T Select 1,  ' ' 
 Select * From @T 
 --Result 
 /* 
 1	1900-01-01 00:00:00.000 
 */
------解决方案--------------------SQLSERVER2000中的空日期值为 '1900-01-01 ',没有 ' '这样的空日期值,可以将日期值更新为NULL来避免这种情况。
------解决方案--------------------默认会把 ' '转换为1900-01-01 00:00:00.000 
 select convert(datetime, ' ',120) 
 --1900-01-01 00:00:00.000