How to filter [Today] and time in a SharePoint list view?

I am trying to filter Sharepoint lists based on date and time. But it only works with the date, ignores the time in the data and time fields.

enter image description here

+6
source share
3 answers

In SharePoint Designer, I edit a CAML request from my view in advanced mode. And I add IncludeTimeValue = "True" in the CAML Value Type = "DateTime" tag. I filter 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> 
+9
source

First, SharePoint wildcard filtering [Today] compares only dates, not times. As far as I know, there is no way to compare time in the web interface.

Assuming "TimeOver" is the deadline for your project, and "Start" is when the project begins ...

Add something to the list when it is expired, saying: TimeOver is less than [Today]

Add something to the list when it was launched today: Start is [Today]

Add something that was created in the last week: Start more than [Today] -7

Add something to the list that should be sent within 30 days: TimeOver is longer than [Today], and TimeOver is less than [Today] +30

+3
source

Create a calculated column in NUMBER format (for example, name it "CreatNum"). The column value is a date field (e.g. = Created). Then filter this field, as in the CreateNum field, greater than 46,885.3313 (date in a numerical value). The same calculated column converts existing date fields to numbers so you can easily determine which numeric value to filter.

0
source

Source: https://habr.com/ru/post/952220/


All Articles