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)
Syntaxpublic static double ToRelativeTime(
	this IDfsTemporalAxis timeAxis,
	DateTime dateTime
)
<ExtensionAttribute>
Public Shared Function ToRelativeTime ( 
	timeAxis As IDfsTemporalAxis,
	dateTime As DateTime
) As Double
public:
[ExtensionAttribute]
static double ToRelativeTime(
	IDfsTemporalAxis^ timeAxis, 
	DateTime dateTime
)
[<ExtensionAttribute>]
static member ToRelativeTime : 
        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 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