Re: [sqlite] Sqlite DATE() function. Add a variable amount of months.

2011-06-08 Thread datepb
It works perfectly, Thanks a lot! Sorry for the newbie question ! Pavel Ivanov-2 wrote: > >> The main issue for me here is that the +1 is inside the string '+1 month' >> and i thus cant use a subquerry of the type SELECT date('now','+(SELECT >> id >> FROM table) month'); > > You can do like

Re: [sqlite] Sqlite DATE() function. Add a variable amount of months.

2011-06-08 Thread Pavel Ivanov
> The main issue for me here is that the +1 is inside the string '+1 month' > and i thus cant use a subquerry of the type SELECT date('now','+(SELECT id > FROM table) month'); You can do like this: SELECT date('now','+' || (SELECT id FROM table) || ' month'); Pavel On Wed, Jun 8, 2011 at

[sqlite] Sqlite DATE() function. Add a variable amount of months.

2011-06-08 Thread datepb
Hello, This may seem a very simple issue it is giving me some very hard time. I need to add a variable amount of months to a date. According to the doc, this is done for adding 1 month : SELECT date('now','+1 month'); And I would need something like SELECT date('now','+$i month'); This