Calculated field with time format

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
rogier
Posts: 2
Joined: 2021-05-15 21:46

Calculated field with time format

Post by rogier » 2021-05-21 09:22

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

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Calculated field with time format

Post by onoehring » 2021-05-25 15:30

Hi Rogier,

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

Olaf

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Calculated field with time format

Post by jsetzer » 2021-05-26 04:54

Code: Select all

SELECT 
time_format(timediff(`stop`, `start`), '%H:%i')
FROM `dtv_test_dv`
WHERE `id`='%ID%'
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

Post Reply