1

I have a custom content type with a date field that includes year, month, day, hour and minute. If I create a view of all the node start dates I get something like this

2014-10-23 13:00:00
2014-10-24 18:30:00
2014-10-24 21:00:00
2014-10-25 09:30:00
2014-10-25 10:00:00
2014-10-25 13:00:00
2014-10-25 18:30:00
2014-10-25 21:00:00

I want to create a view that lists only the unique days in ascending order. If possible I'd also like to rewrite these as links. Ideally I'm looking to generate something like

Thursday, October 23 2014
Friday, October 24 2014
Saturday, October 25 2014

or even better

<a href='date-2014-10-23'>Thursday, October 23 2014</a>
<a href='date-2014-10-24'>Friday, October 24 2014</a>
<a href='date-2014-10-25'>Saturday, October 25 2014</a>

I've tried aggregating but I have to install extra modules to get the day granularity and even then I can't sort by date ASC. I've tried grouping but that just add extra headers I can't rewrite as links plus it means I still output a line for each node like this

Thursday, October 23 2014

Thursday, October 23 2014
Thursday, October 23 2014
Thursday, October 23 2014

Friday, October 24 2014

Friday, October 24 2014
Friday, October 24 2014

Saturday, October 25 2014

Saturday, October 25 2014
Saturday, October 25 2014
Saturday, October 25 2014
Saturday, October 25 2014
Saturday, October 25 2014

because the view is only using one field and if I hide it the view doesn't work. I've also used 'Distinct' and 'Pure Distinct' but they don't seem to do anything.

Is there something I'm misunderstanding? I don't get why this is so much trouble to do.

0

This video https://www.youtube.com/watch?v=Cp2SPiwA2Qg shows exactly wat you want. I ussualy follow these steps:

  1. Add a second date field to the view.
  2. In the configuration of that field

    1. Configure the field to only display the year
    2. Exclude the field from display
  3. In the format settings of the view, group by this field.

  • That's not quite what I'm looking for. That view gives you date --title --title date --title I only want to show the dates, no other fields. Basically I only want to show the field I am grouping by. – Robert Feb 2 '15 at 16:56
  • Then you just have to change the title field with the date field... – Robin Feb 2 '15 at 19:15

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.