Adding Weeks & Months together

G

Guest

Way beyond me... need help! I need to add together a specific number of
months and weeks to a target date. The TargetSubDate field is filled in by
the user and formatted for Short Date. The MonthsToComplete field is
formatted as fixed, 0 decimal, and the user would simply enter in a number.
The weeks field, EstLeadTime, is a calculation as follows and works correctly
according to the amount in GrandTotal:

=IIf([GrandTotal]<10000,1,IIf([GrandTotal] Between 9999.99 And
50000,3,IIf([GrandTotal] Between 50000 And 100000,4,IIf([GrandTotal] Between
99999.99 And 500000,5,IIf([GrandTotal]>500000,6,"")))))

What I need to do is add to the TargetSubDate field, the MonthsToComplete
and the EstLeadTime - which would be something like project is submitted on
September 15, 2006, will take 9 months to complete, and the project is
$35,000 so need to add 9 months and 3 weeks to the date of September 15, 2006.

Any and all help is very much appreciated!!! Jani
 
G

Guest

Here's the basic function to give you a date intMos months and intWks weeks
from dtmSomeDay

dtmFutureDay = DateAdd("m", intMos, DateAdd("ww", intWks, dtmSomeDay))
If
intMos = 9
intWks = 3
dtmSomeDay = 9/15/2006
Then
dtmFutureDay = 7/6/2007

Is that what you are looking for?
 
G

Guest

Wow!!! This is exactly what I needed and your instructions were perfect
because I got it to work the first time... miracle of miracles. Thanks so
much! Jani

Klatuu said:
Here's the basic function to give you a date intMos months and intWks weeks
from dtmSomeDay

dtmFutureDay = DateAdd("m", intMos, DateAdd("ww", intWks, dtmSomeDay))
If
intMos = 9
intWks = 3
dtmSomeDay = 9/15/2006
Then
dtmFutureDay = 7/6/2007

Is that what you are looking for?

Jani said:
Way beyond me... need help! I need to add together a specific number of
months and weeks to a target date. The TargetSubDate field is filled in by
the user and formatted for Short Date. The MonthsToComplete field is
formatted as fixed, 0 decimal, and the user would simply enter in a number.
The weeks field, EstLeadTime, is a calculation as follows and works correctly
according to the amount in GrandTotal:

=IIf([GrandTotal]<10000,1,IIf([GrandTotal] Between 9999.99 And
50000,3,IIf([GrandTotal] Between 50000 And 100000,4,IIf([GrandTotal] Between
99999.99 And 500000,5,IIf([GrandTotal]>500000,6,"")))))

What I need to do is add to the TargetSubDate field, the MonthsToComplete
and the EstLeadTime - which would be something like project is submitted on
September 15, 2006, will take 9 months to complete, and the project is
$35,000 so need to add 9 months and 3 weeks to the date of September 15, 2006.

Any and all help is very much appreciated!!! Jani
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top