Timespan.ToString

Parent Previous Next

Timespan.ToString.

Returns the instance as a string which express the duration as sign, days, hours, minutes, seconds and milliseconds.


Syntax.


 ToString() : String

 


Please notice


Example:


 Timespan tsA.Set(99999, 0, 8, 45, 98);

 String s := tsA.ToString(); //Now s == "+ 99999 00:08:45.098";


 tsA := -tsA;

 s := tsA.ToString(); //Now s == "- 99999 00:08:45.098";

 

 tsA.Set(0, 0, 0, 0, 0);

 s := tsA.ToString(); //Now s == "+ 0 00:00:00.000";