Opened 3 years ago

Closed 20 months ago

#8787 closed task (invalid)

Which function can I use

Reported by: didley@… Owned by: rjollos
Priority: normal Component: WikiTableMacro
Severity: normal Keywords:
Cc: Trac Release: 0.11


I'm using for a query statement below

<= strftime('%s','2011-05-31 23:59:59')

I'm not a professional user of SQL-Queries. I tried

<= strftime('%s',datenow())

I got the message function is unknown. Do you know which function I should use to get the current date?


Attachments (0)

Change History (1)

comment:1 Changed 20 months ago by rjollos

  • Resolution set to invalid
  • Status changed from new to closed

I'm fairly sure this will be database dependent. Here are the functions you can use in SQLite, and an example (for Trac 0.12+, in earlier versions remove the divide by 1000000):

  SELECT datetime(time/1000000, 'unixepoch', 'localtime') AS time
  FROM ticket
  WHERE id=1

If you have further questions, please raise the issue on the mailing list. There you are likely to find people that can answer this question better than I can.

Add Comment

Modify Ticket

as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from rjollos. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.