That way I am always basing the billing day off the original month. That way the billing DAY don't ever change, like going from 31 one month, to 30 then it would stay 30 because the next date is based on 30... Anyhow, thank you so much!!# $_bill is set as a fetchrow_hashref from the mysql db. ($_billUser_month,$_billUser_day,$_billUser_Year) = split /\//, $_bill +->{orig_day}, 3; $_add_Months = $_bill->{months_active} + 1; ($_billUser_Year,$_billUser_month,$_billUser_day) = Add_Delta_YM($ +_billUser_Year,$_billUser_month,$_billUser_day, 0,$_add_Months); ($_billUser_Year,$_billUser_month,$_billUser_day) = Add_Delta_Days($_b +illUser_Year,$_billUser_month,$_billUser_day, -5); $_nextBillingDate = sprintf("%02d/%02d/%02d",$_billUser_month,$_billUs +er_day,$_billUser_Year); $dbh->do(qq{UPDATE `subscription_users` SET `day` = ?, months_active = + months_active + 1 WHERE `id` = ?}, undef, $_nextBillingDate, $_billU +ser_id);
In reply to Re^2: Adding to dates
by Anonymous Monk
in thread Adding to dates
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |