Re: [sqlite] Why does "SELECT julianday('some_date') AS dateNumber" get me a string via ODBC?

2007-06-05 Thread Trey Mack
I see that it is a variant of type VT_BSTR containing "2345678.9123" (or whatever), and I have to use strtod() to convert it to the number I want. Is there a way to write the query to ensure that it will give me a number instead of a string? The type selection is done in your ODBC wrapper, and

Re: [sqlite] Why does "SELECT julianday('some_date') AS dateNumber" get me a string via ODBC?

2007-06-05 Thread Omar Eljumaily
I believe ODBC will do type conversions for you. If not, use sscanf. All sqlite data is stored as strings, I believe, anyway, so there's lots of type conversion going whether it's explicit or not. Representing dates as floating point numbers can be tricky because of subtle rounding issues,