Bikeman17 Posted August 31, 2005 Posted August 31, 2005 Hi there The picture - I got members who must pay a monthly fee in advance to remain active. Before the end of the month, I review their records and I unmark a field for those who didn't pay. For those who paid their monthly fee, the field remains checked. Then I update the Date field manually. I want to add a month to a Date field automatically by clicking on a button. I know the following script can perform the task. Go to Record/Request/Page (First) Loop if ("Payment = "Paid"") :? End If Go to Record/Request/Page (Exit after last, Next) End Loop Go to Record/Request/Page (First) --- All I need is a way to add a month to a Date field that would be a script replacing the question marks in the above loop. Any help is welcome
comment Posted August 31, 2005 Posted August 31, 2005 Try: Set Field [ yourDatefield ; Date ( Month ( yourDatefield ) + 1 , Day ( yourDatefield ) , Year ( yourDatefield ) ) Note, however, that "to add a month to a date" is a rather ambiguous proposition. For example, adding a month to Jan 31, 2005 using the calc above returns Mar 3 (this being "the 31st day of February"). If you don't want this, you will need to set up some exceptions to the rule.
Osman Posted August 31, 2005 Posted August 31, 2005 Hi, you can use the following formula in set field script step, (i did this calculation before) but it is a bit complicated and i didn't optimized it yet. If( Day( Date ( If( Mod(Month ( yourDateField ) + monthIncrement;12)=0;12;Mod(Month ( yourDateField ) + monthIncrement;12)); Day ( yourDateField ); Floor(( Month ( yourDateField ) + monthIncrement) / 12- ,001) + Year ( yourDateField ) ) ) ≠ Day( yourDateField ); Date ( If( Mod(Month ( yourDateField ) + monthIncrement;12)=0;12;Mod(Month ( yourDateField ) + monthIncrement;12)); Day ( yourDateField ); Floor(( Month ( yourDateField ) + monthIncrement) / 12- ,001) + Year ( yourDateField ) )- Day ( Date ( If( Mod(Month ( yourDateField ) + monthIncrement;12)=0;12;Mod(Month ( yourDateField ) + monthIncrement;12)); Day ( yourDateField ); Floor(( Month ( yourDateField ) + monthIncrement) / 12- ,001) + Year ( yourDateField ) ) ); Date ( If( Mod(Month ( yourDateField ) + monthIncrement;12)=0;12;Mod(Month ( yourDateField ) + monthIncrement;12)); Day ( yourDateField ); Floor(( Month ( yourDateField ) + monthIncrement) / 12- ,001) + Year ( yourDateField ) )) Note: monthIncrement is a number field in your case you can replace them by 1. If you want to add more than one month you can input accordingly as 2,3... Adam Djuby
LaRetta Posted August 31, 2005 Posted August 31, 2005 The other option, Bikerman17, is to prorate your fees to month end. Breaking fees into daily increments (to catch a member up with the group) is usually appreciated by most consumers because they can plan their budget (allows a bit of lead time; not as big a chunk) and it also is easy for them to remember. It will tickle your administrative team. The benefit, of all memberships coming due at the same time, is that Statements, Invoices, credit card billings, etc. can be handled in batch form and on more routine cycles which will also make your accountants very happy (because process can be planned to coincide with closing month-end). The increased efficiency (doing it once) saves administrative staff time. Billing 5 clients takes just as much time as billing 150 from the manual process perspective (loading printers with statements, envelopes, postage, filing, etc). The computer processes both instantly. Saving admin staff time saves money for the owner. These time-saving EQ's (efficiency quotients) translate into real savings and are well documented (mostly by me). Of course it isn't the best option for every business situation, but it's worth considering if you can. I have heard no business complain when using this cycle method; I hear nothing but complaints from businesses that try to run this piecemeal every day, matching to a handful of 'those due.' LaRetta
VICH Posted September 1, 2005 Posted September 1, 2005 under the if you could just add 30 days if thats what you mean by a month and not just a calender month if [payment = "paid"] set field [date + 30] and it will just toss an extra 30 days to the date and won't mess anything up or give you and weird returns
comment Posted September 1, 2005 Posted September 1, 2005 It depends - I would call losing 5.25 days per year weird.
LaRetta Posted September 2, 2005 Posted September 2, 2005 It depends - I would call losing 5.25 days per year weird. Unless you're a woman ... then it's a great theory!!! ROFLMAO!!! L
LaRetta Posted September 2, 2005 Posted September 2, 2005 :blond: I just read 'losing 5 days a year' and went into mental calculation of: My age - (5.25 days * my age shut up) = bla bla ... and pictured it skimming right off my age! I was feeling younger by the moment!! Well thanks for bursting my illusion, Ralph. I guess I should have considered the logic of the actual calculation instead of just Michael's last comment (smile)... Men! They can be so darned logical and MUCH too serious. :smile2:
RalphL Posted September 2, 2005 Posted September 2, 2005 Think what it would do to me, you are still young.
Recommended Posts
This topic is 7025 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now