Thanks, need it outside pythong thouhg. This seems to work... DATETIME(SUBSTR(r.time, 1, 10), 'unixepoch', 'localtime') AS dt,
On Wednesday, February 12, 2014 7:51:30 PM UTC, RjOllos wrote: > > On Wednesday, February 12, 2014 4:16:50 AM UTC-8, Rhys Campbell wrote: >> >> Hi All, >> >> I'm trying to report on some details of check ins. >> >> SELECT DATETIME(r.time, 'unixepoch', 'localtime') AS dt, >> r.time, >> nc.base_path >> FROM revision r >> INNER JOIN node_change nc >> ON r.rev = nc.rev >> WHERE nc.base_path LIKE '%string%'; >> >> The 'time' column is stored as an integer which I assume was a unix epoch >> value. This isn't the case as they all convert to 1413-03-01 13:07:12. DOes >> anyone know how to conrrectly convert this value? I want the datetime of >> checkins. >> >> Cheers, >> >> Rhys >> > > I believe the time column should be automatically formatted for you: > http://trac.edgewall.org/wiki/TracReports#Automaticallyformattedcolumns > > The formatting is done in Python code to avoid DB compatibility issues: > > http://trac.edgewall.org/browser/branches/1.0-stable/trac/ticket/templates/report_view.html?rev=12000&marks=158-174#L156 > > -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/trac-users. For more options, visit https://groups.google.com/groups/opt_out.
