Format TimeSpan in DataGridView column
Posted
by
Dan Neely
on Stack Overflow
See other posts from Stack Overflow
or by Dan Neely
Published on 2010-09-02T14:09:43Z
Indexed on
2010/12/30
21:54 UTC
Read the original article
Hit count: 158
I've seen these questions but both involve methods that aren't available in the CellStyle Format value. I only want to show the hours and minutes portion (16:05); not the seconds as well (16:05:13). I tried forcing the seconds value to zero but still got something like 16:05:00. Short of using a kludge like providing a string or a DateTime (and only showing the hour/minutes part) is there any way I can get the formatting to do what I want.
© Stack Overflow or respective owner