你是怎么导出到Excel的?
用模板?

解决方案 »

  1.   

    在excel里面时间好像是不会出现你说的情况的
    应该是在程序的某个地方进行了时间的转化
    在javascript中 如果使用new Date("2008/12/12 12:12:12")这种方法
    就会将时间转化成“Fri Oct 17 10:59:33 UTC+0800 2008”这种格式
      

  2.   


    我是通过Ajax返回一个dataset,之前没进行转换。
    到html时,这样操作的xlSheet.Cells(i+3, 3).Value=ds.Tables[0].Rows[i].PlanConfirmTime;
    结果就是Fri Oct 17 10:59:33 UTC+0800 2008
      

  3.   

    初学javascript,以前弄winform的,麻烦指点下,谢谢。
      

  4.   

    xlSheet.Cells(i+3, 3).Value=new Date(ds.Tables[0].Rows[i].PlanConfirmTime).toLocaleString().replace("年","-").replace("月","-").replace("日",""));
    试试