On 22 Feb 2016, at 6:15pm, Eric Hill <Eric.Hill at jmp.com> wrote:

> Length(theDate) returns 9, and typeof(theDate) returns "real".  I assume 
> typeof is just returning the character version of the column affinity.

No.  typeof() is returning the type of that specific piece of data, not the 
column in general.  In this case it means that that date is being stored as a 
REAL number.  This is what you would expect if your dates are being stored as a 
Julian day number expressed as a floating point value.

> Typeof(MAX(theDate)) and length(MAX(theDate)) also return "real" and 9 
> respectively.

Additional evidence that your values are being stored as floating point numbers.

> At this point, I am rethinking the decision to convert our application's 
> native dates to Julian dates when moving them into SQLite.  I think I made 
> that decision (been a while) so that SQLite's date functions could be applied 
> to the data.

<https://www.sqlite.org/lang_datefunc.html>

says "All five date and time functions take a time string as an argument.".   
"REAL_DATE" does seem to be converting your dates into REAL values, but you 
can't use them directly with SQLite's date functions.

Simon.

Reply via email to