1

Normally when you select a date field in Views there is the option to specify the 'granularity'. Ie: Day, Hour, Minute etc... ie: When you add the 'Post date' field from a node.

Does this functionality not exist at all for the 'Access log: Timestamp' field, when displaying access log entries using Views?

This would be really helpful for displaying simple custom statistics, but it doesn't seem to exist and I'm not sure where to even look to add the functionality to the relevant module!

0

Maybe the Views Date Format SQL module is what you're looking for. Here are some details (from its project page):

The Views Date Format SQL module allows to format date fields using SQL. This enables group aggregation for date fields using the choosen granularity.

The core functionality is to remove the date formatting from render() and put it in query(). I.e. format date values using SQL's DATE_FORMAT rather than PHP's format_date. This is achieved by assigning a new default handler to node 'created' and 'changed' date fields. This handler extends and overrides views's build in views_handler_field_date.

The UI is completely unobtrusive, only a single checkbox "Use SQL to format dates" is added to the handler configuration popup.

As an illustration, and/or to better understand the challenge here, you may want to look at Graph node input over time (support date formatting on a continuous axis) also. Comment #3 of that issue states: 'The trouble here is that neither Views nor Date modules provide aggregation options for date-based fields.'.

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.