【发布时间】:2017-09-03 14:00:43
【问题描述】:
我检查了这个链接 Format SQL Server 2012 Time(7) to "HH:mm"
但我想更改 C# 中的格式。
这样
dgvRoster.Columns[1].DefaultCellStyle = new DataGridViewCellStyle { Format = "hh:mm tt" };
这行代码适用于 SQL Server 的 datetime 数据类型。
我尝试将数据类型 DateTime 更改为 time(7) 和 time(0),但在这些代码行上导致 THIS EXCEPTION。
【问题讨论】:
标签: c# sql-server winforms datetime datagridview