Send feedback on this topic.
Teradata.Client.Provider
RightDiff Method (TdPeriodDate)



Teradata.Client.Provider Namespace > TdPeriodDate Structure : RightDiff Method
The left TdPeriodDate operand.
The right TdPeriodDate operand.
The period that contains the portion from the ending bound of the left operand to the ending bound of the right when the operands overlap.
Syntax
'Declaration
 
Public Shared Function RightDiff( _
   ByVal left As TdPeriodDate, _
   ByVal right As TdPeriodDate _
) As TdPeriodDate
'Usage
 
Dim left As TdPeriodDate
Dim right As TdPeriodDate
Dim value As TdPeriodDate
 
value = TdPeriodDate.RightDiff(left, right)
public static TdPeriodDate RightDiff( 
   TdPeriodDate left,
   TdPeriodDate right
)
public:
static TdPeriodDate RightDiff( 
   TdPeriodDate left,
   TdPeriodDate right
) 

Parameters

left
The left TdPeriodDate operand.
right
The right TdPeriodDate operand.

Return Value

A TdPeriodDate is returned that contains the period that begins from the end of the left operand to the end of the right when the operands overlap.
Remarks

A TdPeriodDate.Null is returned under the following scenarios:

In the following examples the left and right operands are defined as (bL, eL) and (bR, eR), respectively.

term>
Example Comments
             |------|-------|------|
             bL     bR      eL     eR
                            |======|
             
Rdiff = (eL, eR)
             |------|------|------|
             bR     bL     eL     eR
                           |======|
             
Rdiff = (eL, eR)
             |-------|------|------|
             bL      bR     eR     eL
             

Rdiff = null

The left operand's ending bound is greater than the ending bound of the right operand.

             |-------|-----|--------|
             bL      eL    bR       eR
             

Rdiff = null

The left and right operands do not overlap.

             |-------|-----|--------|
             bR      eR    bL       eL
             

Rdiff = null

The left and right operands do not overlap.

             |----------|----------|
             bL         bR       eL eR
             

Rdiff = null

The ending bounds are equal. In other words, a period cannot be defined whose starting and ending bounds are equal.

Requirements

Target Platforms: Windows 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2

See Also

Reference

TdPeriodDate Structure
TdPeriodDate Members