Compartilhar via


Lt Element

The Lt element is an arithmetic operator that means "less than" and is used in queries in views. This element is used similarly to Eq and Gt.

Syntax

<Lt>
</Lt>

Element Relationships

Parent Elements Child Elements
And, Or, Where FieldRef, Value

Remarks

Remember that Collaborative Application Markup Language (CAML) is case sensitive; note the lowercase "t" in this element's name.

Example

The following example queries for cases where the Deadline field value either equals an empty string or is less than the current date.

<Query>
  <Where>
    <Or>
      <IsNull>
        <FieldRef Name="Deadline" />
      </IsNull>
      <Lt>
        <FieldRef Name="Deadline" />
        <Value Type="DateTime">
          <Today />
        </Value>
      </Lt>
    </Or>
  </Where>
  <OrderBy>
    <FieldRef Name="Modified" Ascending="FALSE" />
  </OrderBy>
</Query>