Calculating Age Part 2: Check the Accuracy of Calculations in my Original Microsoft Access Age Video

preview_player
Показать описание
In this video, we will examine the Age calculations in my original Microsoft Access Age video and see just how accurate they are. I built a database to run through 10 million date calculation iterations, and it turns out the original formula is 99.91% accurate. I will, however, show you a more advanced formula that is always 100% accurate.

Rabid Follower (a YouTube Subscriber) says: I think dividing by 365.2524 could lead to erroneous results pretty often, and it's not "1 in 5000" like you said... It’s more like 1 in 486 from my calculation.

BONUS FOR MEMBERS:
Silver Members and up get access to an Extended Cut of this video. Members will see exactly how I built my database to perform my calculations to check my accuracy.

MEMBERS VIDEO:

BECOME A MEMBER:

LEARN MORE:

LINKS:

COURSES:

FREE TEMPLATE DOWNLOADS:

ADDITIONAL RESOURCES:

KEYWORDS:
microsoft access, ms access, #msaccess, #microsoftaccess, #help, #howto, #tutorial, #instruction, #learn, #lesson, #training, #database, calculating age part 2, age in access, 100% accurate age in microsoft access, datediff, dateserial

QUESTIONS:
Please feel free to post your questions or comments below. Thanks.
Рекомендации по теме
Комментарии
Автор

Richard, thanks for responding via this video. Regarding your method for getting 100% correct age, it would fail if the DOB was on 2/29 in a leap year and today's date is on 2/28 in a common year. For instance, if DOB is 2/29/2000 and today's date is 2/28/2021, this person is exactly 20 years 365 days old. That makes him 21 according to our government, because the IRS considers 365 days as one year no matter what. But your function would think that since 2/29 comes after 2/28, less than a year must have passed, so it deducts one year. But because of the extra day in a leap year, there are, in fact, 365 days (not 364) between 2/29/leap year and 2/28/next common year. So this method is tripped up by leap years just like dividing by 365.25. But of course, you could modify your function to specially check for 2/29/LY and 2/28/CY. And 2/29 is the only day this would happen to, simply because it is an extra day. All other dates in a leap year are not affected. E.g. 4/2/LY to 4/1/NCY is only 364 days, and your function would work.

rabidfollower
Автор

Dear sir ur video for converting reports to pdf was very useful but only problem is that report is not splitting. Pls upload the video to split the report n save with individual name or unique name

arunsingh
Автор

Hi sir ! Your videos are very helpful for learning access . I am learner and my problem is that, how can I secure my database from piracy by using "Activation Key ". How to create Activation Key only for paid users only on one pc and how to prevent them to use copy of database .Can you explain in detail in next video .It would very helpful for me and my all friends who are waiting for your every video .

maheshdhaygude
Автор

I was making some imaginary dates to create AgeGrp, but I noticed that when I put 08/10/20 and 08/10/21 it does not show 1 year for the baby when shows up on the clinic on 8/10/21, but if I put 08/10/20 and 08/11/21(clinic visit) the following day, then it shows 1 year on the Age calculation query. Then I used another imaginary date for elderly person 08/10/1920 and 08/10/1921 and the elderly person gets the age right as 100 years. So why the baby has to wait until midnight to show 1 year and I used your formula Age at the time of clinic visit: from your video Age #1 or using today() instead of specific date. The reason I don't use today date, because we want to know how old the patient was at the time of the infection illness started when we look at the database in the future. So can I use your formula for retirement due date

tutsecret
Автор

Do you have formula to calculate age months for baby. under 1 year

tutsecret
Автор

I have this in one of my databases that I designed years ago. I don't remember where I found it. It seems to be 100% accurate. =DateDiff("yyyy", [Birthday], Now())+Int(Format(Now(), "mmdd")<Format([Birthday], "mmdd")). Care to test it? Of course I already changed it in my database to your calculation, Thank you! P.S. I'm still hoping for a seminar on ISBN JSON Parsing.

joefensterblau
Автор

How do you calculate the age if you only have their birthdates?

Rock
Автор

Function fLeeftijd(geb_dat As Variant) As Byte
If IsNull(geb_dat) Then
fLeeftijd = 0
Else
If IsDate(geb_dat) Then
If Format(geb_dat, "mmdd") > Format(Date, "mmdd") Then
fLeeftijd = DateDiff("yyyy", geb_dat, Date) - 1
Else
fLeeftijd = DateDiff("yyyy", geb_dat, Date)
End If
Else
fLeeftijd = 0
End If
End If
End Function

HankMegens