How to convert the “time” from DateTime into int?
问题 I have a DataGrid which contains a few values that are in hours and I wanted to know: How to get ONLY the time from my DataGrid and convert it into an int (or double) variable. My goal is to do a few operations with my DataGrid time values, like to add numbers into it EXAMPLE: Using my "dataGridView1.Rows[1].Cells[2].Value.ToString();" It'll show a DateTime value (which is inside my DataGrid), with this value, I wanna filter ONLY the time from this and convert it into an int the part of my