Opened 7 years ago

Closed 5 years ago

#8787 closed task (invalid)

Which function can I use

Reported by: didley@… Owned by: Ryan J Ollos
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 5 years ago by Ryan J Ollos

Resolution: invalid
Status: newclosed

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.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.