Works perfectly! 

Thank you very much!! :-)





From:
Ethan Jucovy <[email protected]>
To:
[email protected]
Date:
12/29/2011 09:36 AM
Subject:
Re: [Trac] needing some help with sqlite Ticket Query
Sent by:
[email protected]



Trac stores timestamps as microseconds, so you need to convert it in your 
query.  The following works:

SELECT ticket, time as created, time, author, field, oldvalue,
newvalue from ticket_change
WHERE author = $USER
AND julianday(time / 1000000, 'unixepoch') > julianday('now')-7
ORDER BY time DESC

On Thu, Dec 29, 2011 at 11:13 AM, 3vix6 <[email protected]> wrote:
Hi,

Here's what I'm trying to do.. I need to have a ticket report that
will bring up all user's activity to tickets within the last 7 days.

Here is what I have so far..


SELECT ticket, time as created, time, author, field, oldvalue,
newvalue from ticket_change WHERE author = $USER and julianday(time,
'unixepoch') > julianday('now')-7


ORDER BY time DESC

For some reason, this isn't working.. Is there anyone out there can
see what I'm doing wrong?

--
You received this message because you are subscribed to the Google Groups 
"Trac Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
"Trac Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.

Reply via email to