DfsExtensionsToRelativeSeconds Method |
Returns the
dateTime in relative seconds from the
start time of the time axis, in the unit used by the file.
The time axis must be a calendar type axis.
Note that for the equidistant axes, the first time step may be offset
(see StartTimeOffset), however the
time returned here is relative to the start time and not the first time
step. This is matching the time returned by the read methods (Time).
Namespace: DHI.Generic.MikeZero.DFSAssembly: DHI.Generic.MikeZero.DFS (in DHI.Generic.MikeZero.DFS.dll) Version: 16.0.0.0 (11.1.1.1111)
Syntax public static double ToRelativeSeconds(
this IDfsTemporalAxis timeAxis,
DateTime dateTime
)
<ExtensionAttribute>
Public Shared Function ToRelativeSeconds (
timeAxis As IDfsTemporalAxis,
dateTime As DateTime
) As Double
public:
[ExtensionAttribute]
static double ToRelativeSeconds(
IDfsTemporalAxis^ timeAxis,
DateTime dateTime
)
[<ExtensionAttribute>]
static member ToRelativeSeconds :
timeAxis : IDfsTemporalAxis *
dateTime : DateTime -> float
Parameters
- timeAxis
- Type: DHI.Generic.MikeZero.DFSIDfsTemporalAxis
Temporal, calendar axis. - dateTime
- Type: SystemDateTime
Date time to get relative time for
Return Value
Type:
DoubleTime in seconds, relative to start time of calendar axis
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IDfsTemporalAxis. 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).
See Also