LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-10-2017, 04:42 PM   #1
pizzipie
Member
 
Registered: Jun 2005
Location: Hayden, ID
Distribution: Ubuntu 20.04
Posts: 441

Rep: Reputation: 12
SQLITE - date time interpretation puzzle


Hi,

I am new to Sqlite and am trying to work with the Firefox database formhistory.sqlite.

The firstused field is of type INTEGER and I assume a representation of a date.

My problem is that the date integer is 143581835467200. I've tried
Code:
SELECT datetime(143581835467200, 'unixepoch', 'localtime');
which gives me garbage. NOTE: The example Sqlite gives of this function uses a 10 digit integer not 16 digit.

I can't determine what function will convert this INTEGER to a meaningful date,time string.

R
 
Old 09-10-2017, 05:30 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
It appears the time stamp is in microseconds.

http://forensicswiki.org/wiki/Mozill...xample_queries
 
1 members found this post helpful.
Old 09-10-2017, 07:14 PM   #3
pizzipie
Member
 
Registered: Jun 2005
Location: Hayden, ID
Distribution: Ubuntu 20.04
Posts: 441

Original Poster
Rep: Reputation: 12
Thanks much, michaelk

Code:
select datetime(firstused/1000000, 'unixepoch', 'localtime') from moz_formhistory;
did the job.

R
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] INterpretation of Compile time error message in GFortran. AlexBB Linux - Newbie 2 01-03-2015 07:36 PM
how to convert windows date and time to unix date and time jitupatil_2007 General 8 03-31-2008 05:58 AM
Start Date + Time Duration = End Date/Time calculator? ToBe Linux - General 3 09-26-2005 10:17 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration