Hi Noah

Thanks,
instead of using created, I'm using now datecreated and that can we
use in excel.
datecreated gives #seconds since 1970-1-1

Thanks Patrick.



On Sep 16, 7:20 pm, "Noah Kantrowitz" <[EMAIL PROTECTED]> wrote:
> Trac automatically processes certain column names in the query results.
> Anything named "created" is parsed as an epoch timestamp. Just do "as
> datecreated" or something.
>
> --Noahg
>
> > -----Original Message-----
> > From: [email protected] [mailto:[EMAIL PROTECTED]
> > On Behalf Of patrick
> > Sent: Tuesday, September 16, 2008 3:14 AM
> > To: Trac Users
> > Subject: [Trac] Datetime in sql
>
> > Hi all,
>
> > I want to save a report as csv file with datetime format m-d-y in
> > stead of 2006-09-18T15:55:04Z+0200
>
> > I searched in the trac-user group and found this:
> > datetime(time, 'unixepoch', 'localtime') AS created,
>
> > but then I got the following error:
>
> > ValueError: invalid literal for int() with base 10: '2006-09-18
> > 15:53:37'
>
> > File "C:\Program Files\Python25\lib\site-packages\trac\ticket\templates
> > \report_view.html", line 120, in <Expression u"cell.value != 'None'
> > and format_date(int(cell.value)) or '--'">
> >   <td class="date" py:attrs="td_attrs">${cell.value != 'None' and
> > format_date(int(cell.value)) or '--'}
>
> > I read also the sql manual
> >http://www.sqlite.org/lang_datefunc.htmlbut those function are not
> > working
>
> > I'm using:
> > Trac:      0.11.1
> > Python:    2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32
> > bit
> > (Intel)]
> > setuptools:        0.6c8
> > SQLite:    3.3.4
> > pysqlite:  2.3.2
> > Genshi:    0.5.1
> > mod_python:        3.3.1
> > Subversion:        1.4.6 (r28521)
> > jQuery:    1.2.6
>
> > How can I solve this?
>
> > Thanks

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