I am having a hell of a time generating a report with dates of creation for my tickets.
here is my sqlite query( I am directly querying the db)
.header on
.mode csv
.output opentickets.csv
SELECT DISTINCT
id AS ticket, summary, status, priority, t.type AS type,
owner, time as created
FROM ticket t, ticket_custom q
LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
WHERE t.id = q.ticket AND status <> 'closed'
ORDER BY priority, time;
But the value I get for the time of creation is garbage: I get 1341324096360000 when I should get 2012-07-03
I have tried unix epoch time conversion... query:
.header on
.mode csv
.output opentickets.csv
SELECT DISTINCT
id AS ticket, summary, status, priority, t.type AS type,
owner, datetime(time, 'unixepoch') as created
FROM ticket t, ticket_custom q
LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
WHERE t.id = q.ticket AND status <> 'closed'
ORDER BY priority, time;
I get: -1413-03-01 13:07:12
What am I missing?