Stellen Sie eine FrageStellen Sie eine Frage
 

BeantwortetSort DateTime Field

  • Mittwoch, 26. März 2008 10:07Nevrotik TeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillen
     
    Help me!
    I wish to take from the adjusted list the certain values on field DateTime.
    However, the inquiry sorts data only by date of, without consideration time. How it is possible to consider both date, and time?

    Code Snippet

    <Where>
     <Eq>
      <FieldRef Name='dateTimeField' />
      <Value Type='DateTime'>
       2008-03-24T12:00:00Z
      </Value>
     </Eq>
    </Were>


    Enter:
    1. 3/24/2008 12:00:00 AM
    2. 3/24/2008 5:00:00 PM
    3. 3/24/2008 12:00:00 AM

Antworten

  • Mittwoch, 26. März 2008 10:10Gavin Morgan TeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillen
     Beantwortet

    add in the IncludeTimeValue='TRUE'  property to the Value type. (like below)

     

    Code Snippet

    <Where>
     <Eq>
      <FieldRef Name='dateTimeField' />
      <Value Type='DateTime'  IncludeTimeValue='TRUE'>
       2008-03-24T12:00:00Z
      </Value>
     </Eq>
    </Where>

     

     

Alle Antworten