0

The User inputs the time information in three different textboxes: hours/mins/seconds. The time information is stored as total in an xml file in seconds. The user can edit this value within a datagrid. In the datagrid the time information is shown as seconds. How can I achive that the value stored in seconds shows up in the datagrid in a more human readable format and so that the user can edit it in this way?

e.g. 4205 seconds = 1h 10m 5s

IS there a control or something similar?

Filburt
  • 17,626
  • 12
  • 64
  • 115
vbd
  • 3,437
  • 4
  • 32
  • 45
  • you can use Timespan function to get the hours and minutes and seconds format from total seconds and take a look at this link ....http://stackoverflow.com/questions/463642/c-what-is-the-best-way-to-convert-seconds-into-hourminutessecondsmilliseco – Glory Raj Jul 09 '12 at 08:51
  • Is this an ASP.NET or WinForms DataGrid? – Filburt Jul 09 '12 at 08:53
  • possible duplicate of [Need to format dates in dynamically built WPF DataGrid](http://stackoverflow.com/questions/848702/need-to-format-dates-in-dynamically-built-wpf-datagrid) – Filburt Jul 09 '12 at 09:12

1 Answers1

0

You could always build a converter to take the bound value of seconds and spit out a desired string.

ecMode
  • 530
  • 3
  • 16