By DickSwart on
I need to calculate the duration from the node has been created to last comment and node created and now.
Here are my aproached using the views calc calculation fields:
DATEDIFF(day,%node.created,%node_comment_statistics.last_comment_timestamp)
and
DATEDIFF(day,%node.created,NOW())
I added the following values in "Allowable functions and operators: "
+
-
*
/
(
)
,
'
CONCAT
MIN
MAX
ROUND
NOW()
DATEDIFF
day
But still no luck please help me!
Comments
did you ever figure this out?
I am also trying to do a calculation in Views Calc to simply calculate a users age, something like this:
DATEDIFF( "yyyy", [NOW()], %field_data_field_birthdate.field_birthdate_value);
Any ideas where my problem may be?
Thanks.
I'd be interested to find out
I'd be interested to find out if anyone works this out as well.
I ended up using views_customfield with php.
But those calcuations aren't totals by views_calc so it's not a great solution.
I had to use jQuery to sum those columns.
drupal-6-using-jquery-to-pick-up-where-views_calc-falls-short