0

I need to calculate the difference between two date fields in a table view in Views so that each row in the table shows the time difference in days, hours and minutes . The date fields are set to the Date Unix Timestamp. I've set it like that because I believe it's the best option for calculating 'seconds'. Once we know how many seconds there are between the two dates, we should be able to turn that into a human readable format of let's say days, hours, minutes. Can anyone tell me how this is accomplished?

  • You can try using drupal.org/project/views_php module.... – Anil Sagar Oct 27 '14 at 5:47
  • One way is to override one of the templates outputting the second timestamp. You would then run a calculation in PHP and output the time difference. – Deejay Oct 27 '14 at 7:52
  • thanks. both suggestions require to write php code which is great but I don't know how to go about. – BassPlaya Oct 28 '14 at 2:32

Your Answer

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

Browse other questions tagged or ask your own question.