Active
Project:
Date
Version:
7.x-2.x-dev
Component:
Views Filter
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
1 Apr 2013 at 05:36 UTC
Updated:
3 Apr 2013 at 06:57 UTC
I've got a typical date field that collects start and end date values. I want to exclude results from my calendar view where the date value has a duration that is longer than 24 hours. It would be even better to exclude results where the duration spans midnight, but one thing at a time. I don't see how the date filter in views will let me compare the two date values something like this: if (end date) > ((start date) + 24hrs) then exclude results.
This is a marginally popular topic, I think:
http://drupal.org/node/1741312
http://drupal.org/node/769506
Any thoughts? Thanks in advance.
Comments
Comment #1
monish_deb commentedYes you can achieve this functionality using "Global:PHP" as View filter and paste the following PHP code(without delimiter) in "Filter Code"
I have make use of $data variable, likewise there are other variables available which you can make use of.
Works for me.
Comment #1.0
monish_deb commentedMore information...