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

techgirlgeek’s picture

An 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.

a_c_m’s picture

Strange, 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?

dwightaspinwall’s picture

Also seeing this. MySQL at command prompt shows:

| 2012 | May       | 2008-12-29 |         1 | Don't Just Ask, Act! Using Employee-Driven Survey Action Plans to Yield Bottom-Line Results                                           |
| 2012 | May       | 2008-10-23 |         2 | Analytics to Improve HR Alignment and Improve Efficiency                                                                              |
| 2012 | May       | 2008-10-17 |         2 | Developing Leaders to Develop Others                                                                                                  |

while csv and xls output both show:

| 2012 | May       | 2008-12-0 |         1 | Don't Just Ask, Act! Using Employee-Driven Survey Action Plans to Yield Bottom-Line Results                                           |
| 2012 | May       | 2008-10-0 |         2 | Analytics to Improve HR Alignment and Improve Efficiency                                                                              |
| 2012 | May       | 2008-10-0 |         2 | Developing Leaders to Develop Others                                                                                                  |

without pipes of course.

Thanks for the sweet module BTW.