Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
calculatetimes [2021/02/16 12:54]
wikiadmin
calculatetimes [2021/02/16 12:55] (current)
wikiadmin
Line 38: Line 38:
 </code> </code>
  
 +Last 24 hours:
 +<code sql>
 SELECT x.*, time(Cast (( JulianDay(y.dt) - JulianDay(x.dt)) * 24 * 60 * 60 As Integer), 'unixepoch') AS TimeDiff  SELECT x.*, time(Cast (( JulianDay(y.dt) - JulianDay(x.dt)) * 24 * 60 * 60 As Integer), 'unixepoch') AS TimeDiff 
   FROM my_table AS x     FROM my_table AS x  
Line 46: Line 48:
  GROUP   GROUP 
     BY x.id;     BY x.id;
 +</code>
  
 A similar problem (with solution) is described here: A similar problem (with solution) is described here:
 https://stackoverflow.com/questions/18065846/sqlite-subtract-time-difference-between-two-tables-if-there-is-a-match https://stackoverflow.com/questions/18065846/sqlite-subtract-time-difference-between-two-tables-if-there-is-a-match
  • calculatetimes.1613501673.txt.gz
  • Last modified: 2021/02/16 12:54
  • by wikiadmin