I'm trying to filter Sharepoint lists based on date and time. But It only works with date, ignores the time in data and time field.
In SharePoint Designer I edit the CAML query from my view in Advanced Mode. And I add IncludeTimeValue="True" in CAML tag Value Type="DateTime". I'm filtering my results by time.
<Query>
<OrderBy>
<FieldRef Name="Modified" Ascending="FALSE"/>
</OrderBy>
<Where>
<Or>
<Gt>
<FieldRef Name="Start"/>
<Value Type="DateTime" IncludeTimeValue="True">
<Today/>
</Value>
</Gt>
<Gt>
<FieldRef Name="TimeOver"/>
<Value Type="DateTime" IncludeTimeValue="True">
<Today/>
</Value>
</Gt>
</Or>
</Where>
</Query>
First, SharePoint filtering using the [Today] wildcard only compares dates, not times. To my knowledge there is no web interface way of comparing times.
Assuming "TimeOver" is a your project deadline and "Start" is when the project begins...
Add something to a list when it is overdue by saying: TimeOver is Less than [Today]
Add something to a list when it was started today: Start is equal to [Today]
Add something that was created in the past week: Start is greater than [Today]-7
Add something to a list that is due within 30 days: TimeOver is greater than [Today] AND TimeOver is less than [Today]+30
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With