Age calculations work for some, not all dates

S

Susan

I am trying to show current ages on a report. I've tried two different
formulas, and on each the ages show up as years such as 1915, 1920, etc. The
funny thing is that both formulas work fine in other reports in the same
database...just not this one. I've even tried to copy and paste each from a
report that works, still no luck. The formulas I've tried are:

=DateDiff("yyyy",[DOB],Now())+Int(Format(Now(),"MMDD")<Format([DOB],"mmdd"))

and

=DateDiff("yyyy",[DOB],Date())-IIf9Format([DOB],"mmdd")>Format(Date(),"mmdd"),1,0)

Any ideas as to what is going on?
 
J

Jeff Boyce

Susan

Have you checked the mvps.org/access website for alternate "calculations"
to derive age?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
S

Susan

No...I got those formulas on this forum. But why would these formulas work
for some report but not this one...same database, same data?

Jeff Boyce said:
Susan

Have you checked the mvps.org/access website for alternate "calculations"
to derive age?

Regards

Jeff Boyce
Microsoft Office/Access MVP


Susan said:
I am trying to show current ages on a report. I've tried two different
formulas, and on each the ages show up as years such as 1915, 1920, etc.
The
funny thing is that both formulas work fine in other reports in the same
database...just not this one. I've even tried to copy and paste each from
a
report that works, still no luck. The formulas I've tried are:

=DateDiff("yyyy",[DOB],Now())+Int(Format(Now(),"MMDD")<Format([DOB],"mmdd"))

and

=DateDiff("yyyy",[DOB],Date())-IIf9Format([DOB],"mmdd")>Format(Date(),"mmdd"),1,0)

Any ideas as to what is going on?
 
S

Susan

Well, I just deleted the entire textbox and started over. For some reason,
now it works...who can tell? I had tried both formulas before, with no luck.

Susan said:
No...I got those formulas on this forum. But why would these formulas work
for some report but not this one...same database, same data?

Jeff Boyce said:
Susan

Have you checked the mvps.org/access website for alternate "calculations"
to derive age?

Regards

Jeff Boyce
Microsoft Office/Access MVP


Susan said:
I am trying to show current ages on a report. I've tried two different
formulas, and on each the ages show up as years such as 1915, 1920, etc.
The
funny thing is that both formulas work fine in other reports in the same
database...just not this one. I've even tried to copy and paste each from
a
report that works, still no luck. The formulas I've tried are:

=DateDiff("yyyy",[DOB],Now())+Int(Format(Now(),"MMDD")<Format([DOB],"mmdd"))

and

=DateDiff("yyyy",[DOB],Date())-IIf9Format([DOB],"mmdd")>Format(Date(),"mmdd"),1,0)

Any ideas as to what is going on?
 

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