This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Nov 2, 2011, 1:34 PM
19 Posts
topic has been resolvedResolved

Filtering a view by date range of created documents?

  • Category: Other
  • Platform: Windows
  • Release: 8.5.2
  • Role:
  • Tags: view panel,filtering view
  • Replies: 3
I have learned how to filter a view by keys and search thanks to you guys. Now what I am trying to do is to filter a view by date range for all the documents in the database. The user choose a date-from and date-to and the view should just show only  documents created in that date range. I am using search to filter the document and I think it is the right thing to do in this case but I am stuck in how to write a query. Would you give me a hand? Thank you. 
Nov 2, 2011, 2:15 PM
14 Posts
Re: Filtering a view by date range of created documents?
Try this search query string:
 
[yourDateField]>=yyyy-mm-dd and [yourDateField]<=yyyy-mm-dd
 
Two important things here:
- yourDateField has to be a real datetime field, ottherwise you will get an error.
- the formatting yyyy-mm-dd could be yyy-dd-mm, too. Depends on servers (or users) locale settings. Please tyr it out.
 
 
Nov 2, 2011, 2:34 PM
19 Posts
Re: Filtering a view by date range of created documents?
Thank you Bernd for you reply. That is exactly what I am trying to do but what if there is no field for the date? I thought I can use the @Created for the document but how?
I have tried [@Created]>=yyyy-mm-dd and many other options but without any success.
Nov 2, 2011, 3:39 PM
19 Posts
Re: Filtering a view by date range of created documents?
It is solved... The name of the creation date is _CreationDate and the code in search which basically is a FTSearch looks like this:
 return "[_CreationDate] > 11/01/2011";

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal