You can create a TimeSpan
from the minutes first:
TimeSpan minutes = TimeSpan.FromMinutes(705);
Then use DateTime.Add
:
DateTime dt = DateTime.Today.Add( minutes );
Now you can use DateTime.ToString
:
string text = dt.ToString("HH:mm");
You could also use TimeSpan.ToString
(although DateTime.ToString
is more readable):
text = minutes.ToString(@"hh\:mm")
You can use the DataGridViews CellFormatting
event.
How to: Customize Data Formatting in the Windows Forms DataGridView Control