Calculation Madness

J

jsd

I need some help with a calculation....
I'm looking for a formula/calculation for a time
period within an invoice report. Any advise?

"effective date w/current year to effective date the next
year minus a day"
ie. effective date is 3/4/99
Needs to look like: 3/4/03 to 3/3/04

Thanks for any help!!!
 
V

Van T. Dinh

DateAdd("d", -1, DateAdd("yyyy", 1, [EffDate]))

for the "next year minus 1".

HTH
Van T. Dinh
MVP (Access)
 
J

John Vinson

I need some help with a calculation....
I'm looking for a formula/calculation for a time
period within an invoice report. Any advise?

"effective date w/current year to effective date the next
year minus a day"
ie. effective date is 3/4/99
Needs to look like: 3/4/03 to 3/3/04

Thanks for any help!!!

How about

DateSerial(Year(Date(), Month([Effective Date]), Day([Effective Date])
& " to " & DateSerial(Year(Date()) + 1, Month([Effective Date]),
Day([Effective Date]) - 1)
 
J

jsd

So close but so far away! Thanks for the reply!

I was in need of a calculation for an invoice report I'm
designing. The following expression was not rejected,
although I'm prompted that there is an extra )??? I've
tried to play with the calculation but can't seem to
figure out where.

Help....

DateSerial(Year(Date(), Month([Effective Date]), Day
([Effective Date])& " to " & DateSerial(Year(Date() + 1,
Month([Effective Date]), Day([Effective Date]) - 1)
-----Original Message-----
I need some help with a calculation....
I'm looking for a formula/calculation for a time
period within an invoice report. Any advise?

"effective date w/current year to effective date the next
year minus a day"
ie. effective date is 3/4/99
Needs to look like: 3/4/03 to 3/3/04

Thanks for any help!!!

How about

DateSerial(Year(Date(), Month([Effective Date]), Day ([Effective Date])
& " to " & DateSerial(Year(Date()) + 1, Month([Effective Date]),
Day([Effective Date]) - 1)



.
 
Top