Free-Conversant Support / Advanced Query Page - Date Specifications
 Home   About Conversant   Free Sites   Hosting   Support   XML-RPC 


Documentation >> Page Types >> Advanced Query Page - Date Specifications

Advanced Query Page - Date Specifications

The Conversant Advanced Query Page (AQP) type offers a very powerful and flexible way to specify date ranges for use in in stored queries, or simply for provide your members default query form settings that are dynamically generated.

Figure 1
When you view the page properties of an AQP in the admin interface's structure editor, you will see four date specification panels like the one shown in Figure 1. These allow you to set start and end ranges for creation and/or modification dates. There are four "type" options for each date spec, None, Absolute, Relative, and Periodic. Note that each of these date types can be used in combination with any other to specify the beginning and end of a date range.


This one is pretty self evident...if you wish a particular date to be ignored, or blank, select "None."


If you wish to give a specific date that does not change, use the Absolute option, and enter the Month, Day and Year of the date you wish to use.


Use the relative option to select a dynamic date that is always relative to "today", or the current date as of when the page is accessed. A relative date is simply set as a number of days plus or minus Today. For example, if you the AQP to always display all messages from the last 7 days, set the Start Date property to be Relative type, with the entry showing "Today - 7 days", and set the End Date property to be a relative date, with the entry showing "Today + 0 days" (or minus, with zero it doesn't much matter!).


Periodic date specs are the most powerful, but also the most complex to don't fear if you're a little intimidated by the options at first. Periodic dates are useful to describe relative dates that work around calendar periods, specifically Weeks, Months and Years. Each of these "Units" has a beginning and end, and periodic dates allow you specify queries that work within these ranges...for example, you would use periodic date to specify search for "Last Month's messages", "Messages posted this Week", "Year to Date Message", etc. It's easiest to grasp this with some here goes...
Beginning of Last Week
This Image shows a Periodic date specification describing the "beginning of last week". In this case it will return the Sunday before may optionally specify an alternate "start" day for the week period. In the spec, "unit" indicated the period unit to use, "start/end" indicates whether you wish to return the beginning or ending of that period, the "offset" indicates how many periods into the past or future you would like to go, in this case "-1" for last week, "+1" would be next week, etc.

Last day of the month, three months ago.
This image show a date configured to return the last day of the month, 3 months prior. For example, on any day in October, 2000, this spec would return the date July 31, 2000. For any day in December, 2000, this spec would return September 30, 2000.

January 5 of the current year
This spec shows the use of the "add'l days offset". By indicating "unit" of year, "start", and "offset" of 0, you are indicating "the first day of the current year". By using "+5" additional days, you are saying 5 days after that, which for any day in the year 2000, would return January 5, 2000.
View in DG