> On Jan 7, 2015, at 11:35 PM, Paul Sanderson <sandersonforens...@gmail.com> 
> 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  0x49962d2 as value
)
select  DataSet.value,
        DateTime( DataSet.value, 'unixepoch' ) as date,
        typeof( DataSet.value ) as type
from    DataSet

value|date|type
0x49962d2||text
77161170|1972-06-12 01:39:30|integer

To quote the nice manual:

"hexadecimal integer notation is only understood by the SQL language parser, 
not by the type conversions routines”:

https://www.sqlite.org/lang_expr.html#hexint



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to