Thanks Remy,

For anyone else who struggled with this...

SELECT TIMESTAMP WITH TIME ZONE 'epoch' + changetime/1000000 * INTERVAL '1
second' AS DATETIME from ticket limit 10;

... solved my problem.

Rgds,
 Derek



On Mon, Feb 21, 2011 at 9:52 PM, Remy Blank <[email protected]> wrote:

> Derek wrote:
> > id            changetime
> > 265   1286961684095707
> > 8     1284391607878091
> > 9     1283794516523005
> > 14    1283168712679360
> > 19    1284370478825691
> > 22    1283168712679360
> > 32    1283168712679360
> > 33    1283168712679360
> > 34    1283168712679360
> > 36    1284486365699645
> >
> > Could someone please help me to parse the changetime field?
>
> Those are microseconds since the epoch (1970-01-01 00:00:00 UTC). So if
> you need the more familiar "seconds since the epoch" timestamps, you
> simply divide by 1'000'000.
>
> -- Remy
>
>

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