Modify

Opened 3 years ago

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

Description

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?

didley

Attachments (0)

Change History (1)

comment:1 Changed 23 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):

{{{
#!SQLTable
  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

Action
as closed The owner will remain rjollos.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.