Calculate Time Difference

I have date and time data here, it keeps updating every two minutes and already recorded in several days. can we calculate the difference between its first data and its latest data? n same records are updated

1 Like

Hi Abhishekg,
May I know the database name you are currently using.

Regards,
Helical Insight Team

1 Like

I am currently using MySQL Database.

1 Like

Thank you Abhishekg.

For MySQL database, you can calculate the difference between the first and latest data in Helical Insight. For that, you would require custom column.

Follow the steps to implement :

  1. Go to Adhoc Mode

  2. Double click on selection panel region to open Custom Column Window.

  3. Insert the code:

          TIMESTAMPDIFF(HOUR, col1, curdate())
    

whereas : col1: first data

  1. Provide custom column name.
  2. Click OK to confirm.
  3. Now, click “Generate report” to view output.

Similarly, depending on the database other database functions are used for calculating timestamp difference.

Regards,
Helical Insight Team

1 Like