Re: [sqlite] using a hex integer as input to DateTime

2015-01-15 Thread Paul Sanderson
Sorry Carlos - vanilla sqlite is required. Its not a big issue for me. Cheers Paul www.sandersonforensics.com skype: r3scue193 twitter: @sandersonforens Tel +44 (0)1326 572786 http://sandersonforensics.com/forum/content.php?195-SQLite-Forensic-Toolkit -Forensic Toolkit for SQLite

Re: [sqlite] using a hex integer as input to DateTime

2015-01-15 Thread Carlos Milon Silva
Hi, I do use Xojo (Realbasic) to develop applications with SQLite databases. I also use some SQLite extensions from: http://www.monkeybreadsoftware.de/SQLiteExtension/index.shtml I guess they would be useful (as generic SQLite load extension) in Your Toolkit. You may ask Christian to support

Re: [sqlite] using a hex integer as input to DateTime

2015-01-15 Thread Paul Sanderson
Thanks Peter Coding outside of SQLite is easy - it's doing it with just SQLite/SQL that I was after :( Cheers Paul www.sandersonforensics.com skype: r3scue193 twitter: @sandersonforens Tel +44 (0)1326 572786 http://sandersonforensics.com/forum/content.php?195-SQLite-Forensic-Toolkit -Forensic

Re: [sqlite] using a hex integer as input to DateTime

2015-01-14 Thread Peter Aronson
If you're accessing SQLite from your own program, adding a hextoint function would be pretty easy. Even if you were using sqlite3, defining your own extension isn't that hard (and is documented on the SQLite website to some extent). That would allow you to do most of the things you've been

Re: [sqlite] using a hex integer as input to DateTime

2015-01-14 Thread Richard Hipp
On 1/14/15, Paul Sanderson wrote: > Thanks all > > I am running the latest version :) > > I am just getting back to this and have a related problem > > I have a table > > create table (base int, hex text) > > and I want to create a trigger such that if hex is updated

Re: [sqlite] using a hex integer as input to DateTime

2015-01-14 Thread Paul Sanderson
Thanks all I am running the latest version :) I am just getting back to this and have a related problem I have a table create table (base int, hex text) and I want to create a trigger such that if hex is updated (or a new row inserted) with a text string in the form 0x12345abcd this value is

Re: [sqlite] using a hex integer as input to DateTime

2015-01-07 Thread Richard Hipp
On 1/7/15, Paul Sanderson wrote: > Evening all > > I dont think this can be done, but would love to be corrected. I have > a column with integer dates stored in hex format so 1234567890 is > stored as 49962d2 > > Obviously > DateTime(1234567890, 'unixepoch') > > work

Re: [sqlite] using a hex integer as input to DateTime

2015-01-07 Thread Scott Robison
On Wed, Jan 7, 2015 at 3:35 PM, Paul Sanderson wrote: > Hmm - why can't I get that to work when the hex value is stored in a > column, i.e. > > select DateTime(base, 'unixepoch') from dates > > where there is a single row and base = 0x49962d2 > Paul > The

Re: [sqlite] using a hex integer as input to DateTime

2015-01-07 Thread Petite Abeille
> On Jan 7, 2015, at 11:35 PM, Paul Sanderson > wrote: > > Hmm - why can't I get that to work when the hex value is stored in a > column, i.e. Most likely your data is stored as text, e.g.: with DataSet as ( select '0x49962d2' as value union all select

Re: [sqlite] using a hex integer as input to DateTime

2015-01-07 Thread Paul Sanderson
Hmm - why can't I get that to work when the hex value is stored in a column, i.e. select DateTime(base, 'unixepoch') from dates where there is a single row and base = 0x49962d2 Paul www.sandersonforensics.com skype: r3scue193 twitter: @sandersonforens Tel +44 (0)1326 572786

Re: [sqlite] using a hex integer as input to DateTime

2015-01-07 Thread Petite Abeille
> On Jan 7, 2015, at 11:08 PM, Paul Sanderson > wrote: > > Is this possible? With a contemporary version of SQLite, yes: sqlite> select DateTime(77161170, 'unixepoch'); 1972-06-12 01:39:30 sqlite> select DateTime(0x49962d2, 'unixepoch'); 1972-06-12 01:39:30

[sqlite] using a hex integer as input to DateTime

2015-01-07 Thread Paul Sanderson
Evening all I dont think this can be done, but would love to be corrected. I have a column with integer dates stored in hex format so 1234567890 is stored as 49962d2 Obviously DateTime(1234567890, 'unixepoch') work OK, but what I would like to do is something like DateTime(0x49962d2,