On Thu, 10 Feb 2011 17:55:57 -0500, Jay A. Kreibich <j...@kreibi.ch> wrote:

> On Thu, Feb 10, 2011 at 02:47:29PM -0800, fearless_fool scratched on the  
> wall:
>>
>> Meh.  I have a solution, but I don't like it very much because it feels
>> convoluted:
>>
>> > sqlite> select strftime('%Y-%m-%d', julianday('2011-01-01') + digit)
>> >         as d from digits;
>
>> This takes advantage that JULIANDAY is in units of days.  I'll go with  
>> this
>> unless some guru suggests something cleaner.
>
>
>   SELECT date( '2011-01-01', digit || 'days' ) AS d FROM digits;

s/'days'/' days'/

(Thanks for the tip on quotes; I should have added  
http://www.sqlite.org/lang_expr.html and  
http://www.sqlite.org/lang_keywords.html .)

Very truly,

Samuel Adam ◊ <http://certifound.com/>
763 Montgomery Road ◊ Hillsborough, NJ  08844-1304 ◊ United States
Legal advice from a non-lawyer: “If you are sued, don’t do what the
Supreme Court of New Jersey, its agents, and its officers did.”
http://www.youtube.com/watch?v=iT2hEwBfU1g
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to