从Datagrid导出时,excel中的datetime列出现问题。 [英] Issue with datetime column in excel when exporting from Datagrid.

查看:92
本文介绍了从Datagrid导出时,excel中的datetime列出现问题。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个从MS SQL 2008服务器提取数据的数据网格。 日期列在UI上以正确的格式显示。但是在导出到excel时,日期列格式会变为double。例如。 2014年4月3日转换为40256.847.这是因为一些系统设置?或者我是否需要更改代码。

解决方案

请参阅 http ://www.cpearson.com/excel/datetime.htm [ ^ ]。

I have a datagrid that pulls data from MS SQL 2008 server. The Date column appears in correct format on the UI. But on export to excel, the date column format changes to double. Eg. 4/3/2014 gets converted to something like 40256.847.Is it because of some System settings? Or do I need to change the code.

解决方案

See http://www.cpearson.com/excel/datetime.htm[^].


这篇关于从Datagrid导出时,excel中的datetime列出现问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆