in reply to Re: Adding to dates
in thread Adding to dates

Thank you! That worked. Here is what I did:
# $_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);
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!!


Thanks again!
RJEnterprises