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
> 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
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
3 matches
Mail list logo