Active
Project:
Custom reports
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Jun 2010 at 21:53 UTC
Updated:
24 May 2012 at 08:54 UTC
I'm building a custom report using this module. In MySQL Workbench, the query works fine, but I just noticed when I run the following query and the results, is missing the second digit of the day.
Query:
SELECT d.uid as UID, DATE_FORMAT(FROM_UNIXTIME(d.timestamp), '%Y-%m-%d %H:%i:%S') AS TIMESTAMP
FROM download_count d
Result:
UID TIMESTAMP
6 2010-06-0 13:57:54
6 2010-06-0 13:59:31
6 2010-06-0 10:40:40
11 2010-06-0 11:00:18
11 2010-06-0 11:00:28
(See date: 2010-06-0, should be 2010-06-08)
Any thoughts would be so greatly appreciated. This is to go live pretty immediately.
Comments
Comment #1
techgirlgeek commentedAn alternative for getting the correct date format was brought to my attention to save the day:
DATE_FORMAT(FROM_UNIXTIME(timestamp), GET_FORMAT(DATETIME,'ISO'))
But this is still an issue.
Comment #2
a_c_m commentedStrange, i doubt its the module stripping that out - have you tried running the SQL with devel's php execute to see if its a Drupal / query issues instead of a module issue?
Comment #3
dwightaspinwall commentedAlso seeing this. MySQL at command prompt shows:
while csv and xls output both show:
without pipes of course.
Thanks for the sweet module BTW.