{"id":439,"date":"2012-04-21T06:25:13","date_gmt":"2012-04-21T06:25:13","guid":{"rendered":"http:\/\/devnot.wordpress.com\/?p=439"},"modified":"2012-04-21T06:25:13","modified_gmt":"2012-04-21T06:25:13","slug":"showing-time-in-datagridview-column","status":"publish","type":"post","link":"https:\/\/thomas-jansen.eu\/?p=439","title":{"rendered":"Showing time in DataGridView column"},"content":{"rendered":"<p>To show time in a DataGridView column set the column type to DataGridViewTextBoxColumn.<br \/>\nSet the columns DefaultCellStyle Format to &#8216;t&#8217;. You can do this in the designer or use the following code:<\/p>\n<p>myGridView.Columns[0].DefaultCellStyle.Format = &#8220;t&#8221;;  \/\/0 is the required column, change if needed.<\/p>\n<p>Now you can assign a DateTime  to the cell value and time will show in the users preferred format (&#8216;t&#8217;). <\/p>\n","protected":false},"excerpt":{"rendered":"<p>To show time in a DataGridView column set the column type to DataGridViewTextBoxColumn. Set the columns DefaultCellStyle Format to &#8216;t&#8217;. You can do this in the designer or use the following code: myGridView.Columns[0].DefaultCellStyle.Format = &#8220;t&#8221;; \/\/0 is the required column, change if needed. Now you can assign a DateTime to the cell value and time [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-439","post","type-post","status-publish","format-standard","hentry","category-c"],"_links":{"self":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/posts\/439","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=439"}],"version-history":[{"count":0,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/posts\/439\/revisions"}],"wp:attachment":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=439"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=439"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}