1

I need to display nodes that were created within a certain period of time.

Setting Date: Date (node) (content: post date) as contextual Views filter works super smooth. Now when I call archive/2014-04-01-10--2014-04-04-15 all nodes created between April 1st 10am and April 4th 3pm will be displayed.

But how can I set the granularity to also respect minutes (and seconds)? How to alter the date filter or how to write a custom timestamp contextual filter?

3
+100

I think you only have to pass the hours and minutes in to your contextual filter.

I have a View with filtering between dates and the URL is like that: http://mysite.com/myview?changed%5Bmin%5D=23-03-2013+12%3A24&changed%5Bmax%5D=23-03-2013+18%3A24

This is for the access data from 23-03-2013 12:24 to 23-03-2013 18:24.

Also, make sure you have enabled the Date submodule Date views as it provides some improvements using dates in Views.

  • Thanks! It simply works with a URL like mysite.com/my-archive-view/2014-04-01+10:20:00--2014-04-07+09:23:00 – leymannx Apr 7 '14 at 12:52
  • What about seconds? Is that possible? – rooby May 15 '14 at 8:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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