Date difference to calculate event hours

  • OTWD
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
3 years 2 months ago - 3 years 2 months ago #149635 by OTWD
Hi Tuan,
Rather than manually entering hours into the Event XML custom fields is there a SQL method using the Start / End Date and return the hours?
I tried adding a sql custom field - all i want to do is return the output and show it in the registrants management page in one of the cols and also output it on the certificate.  
Code:
SELECT TIMESTAMPDIFF(HOUR,`event_date`,`event_end_date`) AS coursetime FROM `#_eb_events` 

Success consists of going from failure to failure without loss of enthusiasm.
Last edit: 3 years 2 months ago by OTWD.

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
3 years 2 months ago #149639 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Date difference to calculate event hours
Hello

Yes, no need for entering hours manually for each event. It could be dynamic calculated. But it will require customizing code of registrants management layout, not via an SQL field as you are trying to do

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc