还用 datetime
select convert(char(20),getdate(),120)  ---2004-03-28 14:47:08

解决方案 »

  1.   

    用varchar吧,也可用datetime,提取時處理一下:CONVERT函數
      

  2.   

    毫秒select convert(char(23),getdate(),113)  ---28 03 2004 14:50:06:817
      

  3.   

    能解释一下“select convert(char(23),getdate(),113)”里的23 和113代表的意思吗?
    成绩字段存储的数据是精确到毫秒级的(如3'28''65),而datetime类型只能精确到秒。
      

  4.   

    能解释一下“select convert(char(23),getdate(),113)”里的23 和113代表的意思吗?
    成绩字段存储的数据是精确到毫秒级的(如3'28''65),而datetime类型只能精确到秒。113是参数,23是字符串的长度