UtilDateTimeConvertTime Method
Converts between units of time.
Namespace: DevCase.Core.DateAndTimeAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static double ConvertTime(
double value,
TimeUnit fromUnit,
TimeUnit toUnit
)
Public Shared Function ConvertTime (
value As Double,
fromUnit As TimeUnit,
toUnit As TimeUnit
) As Double
Dim value As Double
Dim fromUnit As TimeUnit
Dim toUnit As TimeUnit
Dim returnValue As Double
returnValue = UtilDateTime.ConvertTime(value,
fromUnit, toUnit)
public:
static double ConvertTime(
double value,
TimeUnit fromUnit,
TimeUnit toUnit
)
static member ConvertTime :
value : float *
fromUnit : TimeUnit *
toUnit : TimeUnit -> float
No code example is currently available or this language may not be supported.
- value Double
-
The time value.
- fromUnit TimeUnit
-
The source TimeUnit unit.
- toUnit TimeUnit
-
The target TimeUnit unit.
Double
The resulting value of the conversion.
This is a code example.
No code example is currently available or this language may not be supported.
MsgBox(ConvertTime(1, TimeUnit.Hours, TimeUnit.Milliseconds)) ' Result: 3.600.000
MsgBox(ConvertTime(1, TimeUnit.Hours, TimeUnit.Seconds)) ' Result: 3.600
MsgBox(ConvertTime(1, TimeUnit.Hours, TimeUnit.Minutes)) ' Result: 60
MsgBox(ConvertTime(1, TimeUnit.Hours, TimeUnit.Hours)) ' Result: 1
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
InvalidEnumArgumentException
|
|