By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,397 Members | 1,467 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,397 IT Pros & Developers. It's quick & easy.

datediff function

P: n/a
i tried posting this earlier but it doesn't seem to have worked. So, i will
try it again. =)

I am trying to create a form where i have a text box that generates a
persons age based on the info that is in their dateofbirth text box. I
realize microsoft has a help file which tells one how to do it but it
doesn't seem to work for me. I think this is due to the fact that my
computer settings are a bit different than what microsoft was working with
when they posted that help file. My computer is set to use the short date
function (yy.mm.dd). And this data is how the DateofBirth field is setup.
The input mask for this field is 00.99.99;0;_

but when it comes to creating the age field it ask that one use this as its
control source code:

=DateDiff("yyyy", [Birthdate], Now())+ Int( Format(now(), "mmdd") <
Format( [Birthdate], "mmdd") )

The problem with this is that say i have someone who is born 28.02.04 ...the
number in the age field will be a negative number. Yet if their birthdate is
73.02.01 it will properly generate a DOB of 31. So how do i get this all to
work for me and my settings.

thanks in advance.


Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"chanchito_cojones" <po******@noemail.net> wrote in
news:BK***************@news04.bloor.is.net.cable.r ogers.com:
i tried posting this earlier but it doesn't seem to have
worked. So, i will try it again. =)

Patience, Grasshopper. Your first post was only three hours ago,
and has already been answered.
Bob Quintal
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.