查询datagridveiw中的日期格式 [英] query about the date format in datagridveiw

查看:83
本文介绍了查询datagridveiw中的日期格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

开发人员,

我的问题是,当我使用C#语言通过数据集将csv文件加载到datagridveiw中时,数据可以以29.08.2010格式反映列中的日期,然后将其更改为29-9-2010
格式.问题是,如果我更改系统日期格式,则datagridveiw的日期会自动更改.

我只希望系统日期不影响datagridveiw日期格式.我可以做什么?请帮我解决我的问题.


我的要求是立即解决这个问题,我的ID是

[电子邮件ID已删除]

使用的语言:-C#
应用程序:Windows应用程序
(带标签)

Hi developers,

My problem is that when I have load a csv file into the datagridveiw through dataset using C# language, data can reflect the date in column in 29.08.2010 format, then I changed them to the 29-9-2010
format. The problem is that if I change the system dateformat the date of datagridveiw automatically change.

I just want that system date should not impact the datagridveiw dateformat. What I can do? Please help me solve my problem.


Its my kindly request solve this problem Imediatly my ID is

[email-id removed]

language used :- C#
application : windows application
(tagged)

推荐答案

您可以使用它来设置日期格式:

You can use this to set the date format:

yourDataGridView.Columns[dateColumn].DefaultCellStyle.Format


这篇关于查询datagridveiw中的日期格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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