When generating a YF report, i'm trying to use the Date & Time function "Days between Date"
Date fields are application_date & issue_date. Both are of Database Type: "Date"
The SQL Syntax would be
AVG(datediff(issue_date,application_date) as 'Calendar Days'
However YF doesn't give me the ability to average (%) the 'Calendar Days' over the issue_yyyymm. The option is not available?
I've done this before, but since then my report will not open (nullpointererror)after we did a local update. But I need to regenerate this report!
If i look at the busted report from table ReportInstance:
use yellowfin;
select * from ReportInstance where ReportID = '341939';
you can see that I got datediff working before, but God knows how!
The SQL syntax from my old report, from table ReportInstance is as follows:
SELECT DISTINCT
`Building Consents`.`issue_yyyymm`,
`Building Consents`.`issue_mmm_yyyy`,
AVG(`Building Consents`.`Process_Days`),
AVG(datediff(issue_date,application_date))
FROM `rg_view_building_consents` AS `Building Consents`
WHERE
`Building Consents`.`issue_yyyymm` BETWEEN 200907 AND 201006
GROUP BY
`Building Consents`.`issue_mmm_yyyy`
so the question is, how do/did I get the AVG(datediff(issue_date,application_date))? I should know how but I can't remember!
Regards,
-David Fear


