User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS Access and FileMaker Pro section within the Web Development category of DaniWeb, a massive community of 375,235 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,016 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS Access and FileMaker Pro advertiser:
Views: 989 | Replies: 3 | Solved
Reply
Join Date: Feb 2008
Posts: 1
Reputation: nicolamoore is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
nicolamoore nicolamoore is offline Offline
Newbie Poster

Question difference in years between two dates (FileMaker Pro 9)

  #1  
Feb 23rd, 2008
I need to calculate the approximate current age in years of patients at a clinic.
We don't have the birthday of all the patients, but we know how old they were when then first registered and we know the date they registered.
I am doing a calculation which returns some strange numbers (e.g., 390, 1271, etc.), which obviously aren't correct.
My calculation goes:
CURRENT AGE = AGE AT REGISTRATION + (CURRENT DATE - DATE OF REGISTRATION).
How to I correct this to make it right?
Thanks.

FIXED IT. Divided the (CURRENT DATE - DATE OF REGISTRATION) by 365 and eureka!
Thanks.
Last edited by nicolamoore : Feb 23rd, 2008 at 4:40 pm. Reason: fixed the problem on my own
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2005
Location: Old Hampshire, Old England (LOL)
Posts: 11,937
Reputation: jbennet is a jewel in the rough jbennet is a jewel in the rough jbennet is a jewel in the rough jbennet is a jewel in the rough 
Rep Power: 30
Solved Threads: 263
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Microsoft Fanboy

Re: difference in years between two dates (FileMaker Pro 9)

  #2  
Feb 24th, 2008
In MS Access VBA you can use the DATEDIFF function
TRY MY SUGGESTIONS AT YOUR OWN RISK!
james.bennet1@ntlworld.com
Reply With Quote  
Join Date: Mar 2006
Location: Japan
Posts: 122
Reputation: HI2Japan is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 12
HI2Japan HI2Japan is offline Offline
Junior Poster

Re: difference in years between two dates (FileMaker Pro 9)

  #3  
Feb 24th, 2008
You might want to consider 365.25. Keep in mind that every four years there is an extra day
Who was the first person to look at a cow and say, "I think I'll squeeze these dangly things here, and drink whatever comes out!"
Reply With Quote  
Join Date: Jan 2008
Posts: 3
Reputation: Bookman is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Bookman Bookman is offline Offline
Newbie Poster

Re: difference in years between two dates (FileMaker Pro 9)

  #4  
Feb 25th, 2008
I think you could use the Year(date) calculation. Try setting up a new field as a calculation, with the following:
Year (registration date)- Age. That should get you somewhere near a birth year.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MS Access and FileMaker Pro Marketplace
Thread Tools Display Modes

Other Threads in the MS Access and FileMaker Pro Forum

All times are GMT -4. The time now is 4:17 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC