Page 1 of 1

Calculated field with time format

Posted: 2021-05-21 09:22
by rogier
Hi,

I use a calculated field to calculate the time difference between to colums.
This works but puts out the time in the following format: hh:mm:ss.ssssss
So I tried to change it with Date format to hh:mm but then the calculation doesn't work.

Is there another way to achieve this format?

My calculated field

Code: Select all

SELECT TIMEDIFF(`dtv_test_db`.`stop`,`dtv_test_db`.`start`) FROM `dtv_test_db` 
WHERE `dtv_test_db`.`id`='%ID%'
//
Rogier

Re: Calculated field with time format

Posted: 2021-05-25 15:30
by onoehring
Hi Rogier,

did you try (I do not know if this is possible) to set the format for the calculated field in AppGini?

Olaf

Re: Calculated field with time format

Posted: 2021-05-26 04:54
by jsetzer

Code: Select all

SELECT 
time_format(timediff(`stop`, `start`), '%H:%i')
FROM `dtv_test_dv`
WHERE `id`='%ID%'