DateTimeHelperConvertHms Method |
Converts seconds to HH:mm:ss format.
Namespace:
Xcalibur.Helpers
Assembly:
Xcalibur.Helpers (in Xcalibur.Helpers.dll) Version: 1.0.1.0 (1.0.1.0)
Syntax public static string ConvertHms(
this double value
)
<ExtensionAttribute>
Public Shared Function ConvertHms (
value As Double
) As String
public:
[ExtensionAttribute]
static String^ ConvertHms(
double value
)
[<ExtensionAttribute>]
static member ConvertHms :
value : float -> string
Parameters
- value
- Type: SystemDouble
The value.
Return Value
Type:
StringUsage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Double. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Examples 1static void Main(string[] args)
2{
3
4 var seconds = DateTime.Now.Subtract(DateTime.Now.AddSeconds(-612650)).TotalSeconds;
5 Console.WriteLine(seconds.ConvertHms());
6
7
8 Console.Read();
9}
10
11
See Also