I am working on a vb.net project that does some web surveilance. In this project I have a gui that allows user to extract history from chrome's sqlite database. For this i made a query which is as follows:
Select datetime(last_visit_time/1000000-11644473600,'unixepoch','localtime') AS time,url from urls where last_visit_time Between '13068081991170787' And datetime(strftime('%s', 'now')*1000000-11644473600,'localtime','unixepoch') order by last_visit_time desc
I ran this query in an sqlite browser on chrome's history database(located at C:\Users\<USER>\AppData\Local\Google\Chrome\User Data\Default\History
) and it is working perfectly fine.
Now Instead of the 2 timings in 'WHERE' clause i want user supplied timings to be inserted. Users supply timing in this format -- > 2015-02-11 05:10:18 (yyyy-mm-dd hh:mm:ss)
How can I convert these timings into chrome timestamps and then supply it to the query. I searched a lot of forums even stackoverflow but all of them had 'How to convert chrome timestamp to human readable and not the vice versa.' I even tried to figure it out but ended up wasting my entire day in it. Please help, I don't know much about sqlite
Aucun commentaire:
Enregistrer un commentaire