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



Teradata.Client.Provider Namespace > TdPeriodDate Structure : LeftDiff Method
The left TdPeriodDate operand.
The right TdPeriodDate operand.
The period whose beginning and ending bounds are defined as the beginning bound of the left operand and the beginning bound of the right operand when the operands overlap.
Syntax
'Declaration
 
Public Shared Function LeftDiff( _
   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.LeftDiff(left, right)
public static TdPeriodDate LeftDiff( 
   TdPeriodDate left,
   TdPeriodDate right
)
public:
static TdPeriodDate LeftDiff( 
   TdPeriodDate left,
   TdPeriodDate right
) 

Parameters

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

Return Value

A TdPeriodDate is returned that includes the portion of the left operand that exists before the beginning of the right operand when the operands overlap.
Remarks

A TdPeriodDate.Null is returned under the following scenarios:

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

Example Comments
            |-----|-----|------|
            bL    bR    eL     eR
            |=====|
            
Ldiff = (bL, bR)
            |-------|-------|------|
            bL      bR      eR     eL
            |=======|
            
Ldiff = (bL, bR)
            |-------|--------|-----|
            bL      eL       bR    eR
            

Ldiff = TdPeriodDate.Null

The left and right operands do not overlap.

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

Ldiff = TdPeriodDate.Null

The beginning bound of the right operand is greater than the beginning bound of the left.

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

Ldiff = TdPeriodDate.Null

The left and right operands do not overlap.

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

Ldiff = TdPeriodDate.Null

The beginning bounds of both operands are equal. A period cannot be created whose beginning and ending bounds are equal.

Requirements

Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019

See Also

Reference

TdPeriodDate Structure
TdPeriodDate Members