On 1 Apr 2012, at 3:05am, John <li...@jspect.fastmail.fm> wrote: > Can the date time functions in SQLite correctly interpret a date string like > '20120331'? Is there a format or modifier that will help the function > interpret/convert that as '2012-03-31'? > > I don't see anything myself at the moment but thought I should ask before > working out other solutions.
I assume you've found <http://www.sqlite.org/lang_datefunc.html> You can deal very well with the '2012-03-31' format, converting between it and Julian and epoch numbers. If you have strings in the format '20120331' stored, you can use a combination of the concatenate operator '||' and the substr(X,Y,Z) function to convert that to the format with the hyphens in. It's not pretty but it works. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users