Dienstag, 19. Juni 2012 17:09
I would like to set a filtering condition within the fixed variable date under SharePoint TeamSite List view. How could I achieve it?
As far as the condition is allowed like [Today] or [Me], my request is to filter those filtered list from 6AM to 5PM GMT+8 everyday according to the creation date.
Mittwoch, 20. Juni 2012 02:09
By default, SharePoint filters only by Date. You'll need SharePoint designer and either edit that existing view or create a DVWP of that list with appropriate filter. Whichever option you choose, you'll need to add the following "attribute" to the CAML query for the DateTime field being filtered.
This will allow you to get the filter to include, well... time. As for the GMT+8, I *think* that'll depend on whatever is the regional setting of the site is, that's what will be used in the all DateTime stamp for the records.
I had done this before, but don't remember exactly what value of the condition looks like. If you play around it, you might be able to figure it out. Shouldn't be too difficult.
Hope that helps...
Mittwoch, 20. Juni 2012 03:18Moderator
Based on your description, you cannot achieve this through out-of-the-box in filter, as parvez said, we can use custom data view web part through SharePoint Designer. When you insert a data view, right click the view, click filter to edit the filter formula.
Here is expression of filter based on Created column(to check whether time is between 6am and 5pm, we use 24hour format to compare):
Please check it , if there is any problem, please feel free to let me know.
TechNet Community Support
- Als Antwort markiert Qiao WeiMicrosoft Contingent Staff, Moderator Donnerstag, 28. Juni 2012 10:01