Remember that date('now') is the UT1 date, not the local (wallclock) date.  To 
get the date 'now' for the timezone in which your computer thinks it is located 
you need to add the 'localtime' qualifier, as in date('now', 'localtime') ...

---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.


>-----Original Message-----
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of Csányi Pál
>Sent: Wednesday, 8 August, 2018 23:59
>To: SQLite mailing list
>Subject: [sqlite] Can date('now') fire a trigger automatically after
>a day passed?
>
>Hi,
>
>I have a column in a table where a value in a row is 'now'.
>The 'now' value is in 'EndDate' column of that row.
>I have also a trigger which fire up when in the 'EndDate' column a
>Field was updated.
>
>Because the 'now' value does changing every day in sense that every
>one know that that yesterday's date is not equal with today's date I
>am thinking about that that this could be used to fire up that
>trigger
>automatically every day. But this does not work.
>
>Then is there a mechanism which would update automatically such date
>value - which is now the 'now' value in that 'EndDate' column Field
>after a day passed?
>
>This is needed in my application which calculates service time
>between
>two dates, namely between StartDate and EndDate where EndDate has the
>'now' value.
>
>I hope I was clear what I mean.
>
>--
>Best, Pali
>_______________________________________________
>sqlite-users mailing list
>sqlite-users@mailinglists.sqlite.org
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to