In WebRadar there are a number of date related fields, from Created Date through to Published Date and most importantly Modified Date. With these fields a myriad of reports can be constructed showing you, for example, what content is sitting idle. The key to these reports however is how the conditions available work.
Along with the usual IS SET and IS NOT SET, there are quite a few additional conditions you can apply to date related field. These are broken into two categories. The first are conditions that use a specific date, for instance ON 2011-07-25. The second group of conditions are relative to the current date, for instance IN THE NEXT 5 days.
This article is aimed at showing you how each of the date conditions work and why you might choose to one over another.
Specific Date Conditions
The conditions that utilise a specific date are
- on, before, after date
- between date1 and date2
To illustrate these conditions, consider the following timeline images for each of the conditions. In each case, the blue line represents the range for which content with the specific date field matches.
1.Content published ON 31st December
2.Content created BETWEEN 30th June and 31st December
3.Content created BEFORE 30th June
4.Content expired AFTER 30th June
Relative Date Conditions
The list of conditions that are relative to the current date are
- in last x days/weeks
- in next x days/weeks
- before the last x days/weeks
- after the next x days/weeks
The significant difference with these conditions compared to the Specific Date conditions is that they are relative to the current date (indicated as NOW in the timeline images below)
1.Content expiring IN NEXT 1 week
2.Content published IN LAST 4 weeks
3.Content published AFTER THE NEXT 1 week
4.Content created BEFORE THE LAST 4 weeks
So why would you choose one category of conditions over another?
If you are trying to answer a specific question, for instance, all content published in the last financial quarter, then you could use a specific date range. This report however would be usually a once off report. In other words, you create it to answer the specific question and are unlikely to run it again.
If however you need a report that monitors some condition of your content, for example, all content to be published in the next week, then you would use a relative date condition as this would result in the report changing the actual date range each time you run it.