![]() |
Sergey Kornilov admin 7/15/2005 |
Boris, select ..., adddate(`datefield`, interval `addfield` day) as dateadded from tablename
select ..., adddate(now(), interval `addfield` day) as dateadded from tablename
|
|
500296 7/16/2005 |
not really, let say, that I have a field date1 with the current date, another field witha numeric value like 1...12 for month and the third field date2. |
![]() |
Sergey Kornilov admin 7/18/2005 |
Hi, select ..., adddate(date1, interval `another field` month) as date2 from tablename |
|
501216 8/8/2005 |
hi again, whre do I put this code? in PHPRunner or ...add.php? whre exacly. |
![]() |
Sergey Kornilov admin 8/9/2005 |
Hi, |
|
501217 8/9/2005 |
ok, I try it, it did not work, I want to when I put the date1 and choose the interval the date2 will be automaticly fill with the calculation. |
![]() |
Sergey Kornilov admin 8/10/2005 |
Boris, // make SQL string
$avalues["`date2`"]="adddate(".$avalues["`date1`"].", interval ".$avalues["`months`"]." month)";
|
|
501218 8/10/2005 |
Finally it works, thanks a lot. |
R
|
rhservice 12/1/2005 |
We have a field called "Contract_Effective_Date" and one called "Contract_End_Date" |
![]() |
Sergey Kornilov admin 12/1/2005 |
If you like two fields always to have the same value - probably you do not need two fields. |
B
|
bantoine 5/3/2009 |
This is an old post but I would like to know with this code given below to add a date with the month calculation, I would like to know how can I use it and substrack 1 day to the interval. for exemple: date1 01/01/2000, month 2 and date2 =date1+month-1 day like date2= 03-30-2000 instaed of 03/01/2000 Boris, open ..._add.php file, find the following snippet: // make SQL string
$avalues["`date2`"]="adddate(".$avalues["`date1`"].", interval ".$avalues["`months`"]." month)";
|
J
|
Jane 5/4/2009 |
Hi, |
B
|
bantoine 5/4/2009 |
I'm using and older version, I think it is the 2.0 version that i bought a few years ago and this code is in xxx_add.php Hi, what PHPRunner version do you use? Where do you want to add this code? |
![]() |
Sergey Kornilov admin 5/4/2009 |
Unfortunately PHPRunner 2.0 is no longer supported. |
B
|
bantoine 5/4/2009 |
Can i something similar in the new version of PHPRunner? where date2=date1+interval(month)-1 day? Whre and how can I have it? Unfortunately PHPRunner 2.0 is no longer supported. |
J
|
Jane 5/5/2009 |
In the latest versions you can calculate this value in the event on the Events tab in PHPRunner directly. |