Pavel

Pavel

  • 1.5k
  • 170
  • 50.2k

DateTime format is^'t accepted in Excel.

Sep 27 2012 10:40 AM
Hello

In one cell of Excel sheet I want to place a value, formatted in the following way:

myExcelWorksheet.Cells[7, "I"] = String.Format("{0:00}:{1:00}:{2:00}:{3:00}", sw.Elapsed.Days, sw.Elapsed.Hours, sw.Elapsed.Minutes, sw.Elapsed.Seconds);

where sw - Stopwatch variable. In the Debug.WriteLine the same construction worky perfectly.

Regards.

Pavel.

Answers (1)