Solved! The trac appears to follow the standard Unix epoch, storing dates 
in microseconds using fields of type bigint (Postgres). It may be useful to 
other users who want to use the date format (YYYYMMDD). 

Examples:

--select to_timestamp(time/1000000) from ticket; 
> --select to_char(to_timestamp(time/1000000), 'YYYYMMDD  HH24:MI:SS')
> --select * from ticket t 
> --           where to_char(to_timestamp(time/1000000),'YYYYMMDD')
> --           between '20130321' and '20130321';


Thank you. 

Em sexta-feira, 15 de março de 2013 16h46min45s UTC-3, ynoslenav escreveu:
>
> What is the structure of SQL to extract data from the table Ticket?
> Have you tried:
>
> select 
>> to_char(TO_TIMESTAMP(time / 1000), 'dd/mm/yyyy HH24:MI:SS')
>> from ticket where owner='ronivon';
>
>
>
> The type is bigint?! :(
>
> @ivanelson
> []s
>

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to