如何在datagridview windows.forms中显示日期列 [英] how to display date column in datagridview windows.forms

查看:63
本文介绍了如何在datagridview windows.forms中显示日期列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

how to display Only Date in datagridview windows.forms

DataGridView



     

日期
1
2
3
4
5
6
7








31

DataGridView


     
Date
1
2
3
4
5
6
7

.
.
.
31

推荐答案

这假设你试图在列中显示日期的一部分。



检查列属性,有Format属性。设置d那里你会得到你文化的默认日期。设置dd,你就会得到一天的部分。



祝你好运。
This assumes you're trying to display day part of the date in the column.

Check column properties, there is Format property. Set "d" there and you'll get default date for your culture. Set dd and you'll get the day part.

Good luck.


这篇关于如何在datagridview windows.forms中显示日期列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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