报表导出时间格式数据多‘0‘
SELECT ru.case_number AS 'caseNumber', ru.case_desc AS 'caseDesc', ru.related_case_number AS 'relatedCaseNumber', ru.case_status AS 'caseStatus', date_format(ru.create_time, '%Y-%m-%d %H:%i:%s') as 'createTime', date_format((select r.modify_time from ru_cases r where r.case_status = '0' and r.case_number = ru.case_number), '%Y-%m-%d %H:%i:%s') as 'endTime', ru.create_by AS 'createBy' FROM ru_cases ru WHERE ru.validate_state = '1'
问题:
报表导出时间格式数据错误。
原因:
date_format(ru.create_time, '%Y-%m-%d %H:%i:%s') as 'createTime'未被格式化,格式化后报表导出数据正常。
一切技术都是为业务服务,脱离业务的技术一文不值!