HELP me calculate a date field VERY Important!!! 
Author Message
 HELP me calculate a date field VERY Important!!!

This seems to be a simple question, but as a beginner I can't figure out the
answer.

I have a date field and a number field in my report.  If I add the number
field to my date field, it adds the number of days.  (example:  1-1-99  +
24=  1-25-99)   I want it to add 24 months, NOT number of days. My
information is in an Access database and I am using CR 7.0.  Is there anyway
to do this?



Sun, 12 May 2002 03:00:00 GMT  
 HELP me calculate a date field VERY Important!!!
Use the DateAdd Function

MyVal = DateAdd(interval,number,date)

in your case : MyVal = DateAdd("m",24,Mydate)   'Adds 24 months

or     MyVal = DateAdd("yyyy",2,Mydate)   'Adds 2 years

so long...



Quote:
> This seems to be a simple question, but as a beginner I can't figure out
the
> answer.

> I have a date field and a number field in my report.  If I add the number
> field to my date field, it adds the number of days.  (example:  1-1-99  +
> 24=  1-25-99)   I want it to add 24 months, NOT number of days. My
> information is in an Access database and I am using CR 7.0.  Is there
anyway
> to do this?



Sun, 12 May 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Changing a Calculate field (Date) depending on Current date

2. Need Help! calculating date fields

3. Updating Calculated field depending on Current Date

4. Calculating date fields

5. Calculating Date Field

6. Calculating a date field

7. calculate dates calculate time

8. very important!; calculating totals row by row

9. Date/Time picker and calculating date differences

10. Calculating future date from date function

11. Help Calculating Dates In Defined Period

12. HELP: Calculating the difference of 2 dates!!

 

 
Powered by phpBB® Forum Software