Advertisement
caffeinatedmike

jabber db example

Aug 8th, 2018
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. #1 hour = 3600000000 microseconds * X-number-of-hours
  2. microseconds = int(round(time.time() * 1000000)) - (3600000000 * 1)
  3.  
  4. conn = sqlite3.connect(file)
  5. cur = conn.cursor()
  6. cur.execute("SELECT date, payload, sender " + \
  7.             "FROM history_message " + \
  8.             "WHERE CAST(date AS Character(32)) >= '{0}%'".format(str(microseconds)))
  9. rows = cur.fetchall()
  10. conn.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement