Am using PHPRunner as a reporting tool (no edit add etc) out of a mySQL d'base created by another app
Works beautifully except the date stored in the d'base is in the unix internal format.
Have tried :
- setting the fields as custom with 'if ($value != 0) $value = date('d M Y H:i', $value);' as code - the fields show nicely, but the Adv Search is still looking at the raw format.
- setting the SQL string as below -
[codebox]select
`mdl_user`.`username`,
`mdl_user`.`firstname`,
`mdl_user`.`lastname`,
`mdl_user`.`email`,
`mdl_user`.`city`,
`mdl_quiz_attempts`.`id`,
`mdl_quiz_attempts`.`attempt`,
`mdl_quiz_attempts`.`sumgrades`,
FROM_UNIXTIME(`mdl_quiz_attempts`.`timestart`,'%d %M %Y') as qtimestart,
FROM_UNIXTIME(`mdl_quiz_attempts`.`timefinish`,'%d %M %Y') as qtimefinish,
FROM_UNIXTIME(`mdl_quiz_attempts`.`timemodified`,'%d %M %Y') as qtimemodified
From `mdl_quiz_attempts`
inner join `mdl_user` on `mdl_quiz_attempts`.`userid`=`mdl_user`.`id`[/codebox]
If the field is set as any sort of date format it appears blank, if set as a generic text field then it shows OK but the date search will not work.
Anyone have any bright ideas??
Thanks for any help you can give.
Phil