6

I have a content type which has a date field. That date field collects:

  • Year
  • Month
  • Day
  • Hour
  • Minute

I've created a view with a filter on that field. The granularity I can filter with only goes down to day. Even if I use operator: is greater than and Relative date: now, the contents of the view only change once a day. That means that hour and minute are not taken into consideration.

Any ideas on how to solve this?

2
  • 1
    I just did a quick check with a view and a date field, it was no problem to set the granularity on the filter down to seconds. Maybe something wrong with your content type?
    – Volker
    Jan 15, 2013 at 12:22
  • @volker: You where right. My CT was messed up.
    – cherouvim
    Jan 23, 2013 at 10:44

1 Answer 1

5

1) Double check your field is collecting the correct date attributes. 2) Make sure "Date Views" is enabled under Modules (Requires: Date API, Views, Chaos tools).

If the above are okay then try creating a new date field making sure you're collecting all date attributes. This should rule out any issues there might be with the field. It could also pay to try create a new date field in a different content type and see how views reacts.

If the new date field doesn't work and views still can't filter down to seconds granularity then try a new test view.

Tested with no problems on Drupal 7.18, Date 7.x-2.6 and Views 7.x-3.5.

2
  • You are right. There is something wrong with my content type since I've previously changed the granularity of that field via manually editing the features file and reverting. This is obviously the reaason for that behavior.
    – cherouvim
    Jan 23, 2013 at 10:44
  • Actually the view filter had the previous granularity. Changing it from the settings solved this problem.
    – cherouvim
    Jan 23, 2013 at 11:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.