This topic is locked

AGE? Log Closed Date - Log Open Date

12/8/2005 11:40:23
PHPRunner General questions
D
defcon2000 author

Hello,
We have 3 fields, age (defined as readonly), Log Closed Date and Log Open Date (defined with now() so when adding a new log the date and time there already).
We want the field age to have the result of "Log Closed Date" less "Log Open Date". We are not interested in the time open or closed.
This will only be done during log_list.php
Any idea?
Thanks in advance.
Rgds,

Sergey Kornilov admin 12/9/2005

Hi,
you can use a calculated field for this.

Modify SQL query on Edit SQL query tab in PHPRunner this way:

select

`Log Closed Date`,

`Log Open Date`,

datediff(`Log Closed Date`,`Log Open Date`) as Age

from ...