Click or drag to resize

DfsExtensionsToRelativeTime Method (IDfsTemporalAxis, DateTime)

Returns the dateTime in relative time 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: 19.0.0.0 (11.1.1.1111)
Syntax
public static double ToRelativeTime(
	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 time axis unit, 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