Click or drag to resize
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.DFS
Assembly: 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
)

Parameters

timeAxis
Type: DHI.Generic.MikeZero.DFSIDfsTemporalAxis
Temporal, calendar axis.
dateTime
Type: SystemDateTime
Date time to get relative time for

Return Value

Type: Double
Time 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