select convert(char(20),你的字段,101) from table_name

解决方案 »

  1.   

    示例:
    use northwindselect convert(char(20),orderdate,101)
     from orders
      

  2.   

    CAST 和 CONVERT
    将某种数据类型的表达式显式转换为另一种数据类型。CAST 和 CONVERT 提供相似的功能。语法
    使用 CAST:CAST ( expression AS data_type ) 使用 CONVERT:CONVERT ( data_type [ ( length ) ] , expression [ , style ] )
      

  3.   

    select convert(char(10),column,x) from tablename
    x 代表的数字很多,你可以自己去试一上,从0到100多
      

  4.   

    --选择日期在2004-09-03的数据
    select  top 10 * from tgoods where datediff(Day,dpubl,'2004-09-03')=0select   * from table where datediff(Day,ziduan,'2004-09-03')=0