If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Ages
How can I work out ages in years and months from an "DateofBirth" field in a
access database report? This is the first time i have tried to calculate this so would like some guidance please. Regards Denis |
#2
|
|||
|
|||
Ages
Take a look at:
A More Complete DateDiff Function at: http://www.accessmvp.com/djsteele/Diff2Dates.html -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Denis" wrote in message ... How can I work out ages in years and months from an "DateofBirth" field in a access database report? This is the first time i have tried to calculate this so would like some guidance please. Regards Denis |
#3
|
|||
|
|||
Ages
If you want a simple function that ONLY returns an age in Years and months
you can find one here http://www.worksrite.com/GetAge.htm -- Ron W www.WorksRite.com "Denis" wrote in message ... How can I work out ages in years and months from an "DateofBirth" field in a access database report? This is the first time i have tried to calculate this so would like some guidance please. Regards Denis |
#4
|
|||
|
|||
Ages
Ron
Copied in the function, changing the DOB for DateofBirth field I have in my batabase but it came up with an error highlighting "Then". Can you advise? Regards Denis "Ron Weiner" wrote: If you want a simple function that ONLY returns an age in Years and months you can find one here http://www.worksrite.com/GetAge.htm -- Ron W www.WorksRite.com "Denis" wrote in message ... How can I work out ages in years and months from an "DateofBirth" field in a access database report? This is the first time i have tried to calculate this so would like some guidance please. Regards Denis |
#5
|
|||
|
|||
Ages
How are you calling the function. As Written it was designed to be called
with two parameters the Start Date (BornOnDate) and the End Date (typically today's Date). So when I call it like this: ? getagestr("1/30/47",date) from the Immediate Window it prints 58y-10m Which is my current age. Exactly how are you attempting to use this function? -- Ron W www.WorksRite.com "Denis" wrote in message ... Ron Copied in the function, changing the DOB for DateofBirth field I have in my batabase but it came up with an error highlighting "Then". Can you advise? Regards Denis "Ron Weiner" wrote: If you want a simple function that ONLY returns an age in Years and months you can find one here http://www.worksrite.com/GetAge.htm -- Ron W www.WorksRite.com "Denis" wrote in message ... How can I work out ages in years and months from an "DateofBirth" field in a access database report? This is the first time i have tried to calculate this so would like some guidance please. Regards Denis |
#6
|
|||
|
|||
Ages
Ron
The database is for employees with a field "DateofBirh" completed dd/mm/yyyy and I am trying to work out their ages in months yy and mm. This is due to age requirements for some positions that are need to be filled. Regards Denis "Ron Weiner" wrote: How are you calling the function. As Written it was designed to be called with two parameters the Start Date (BornOnDate) and the End Date (typically today's Date). So when I call it like this: ? getagestr("1/30/47",date) from the Immediate Window it prints 58y-10m Which is my current age. Exactly how are you attempting to use this function? -- Ron W www.WorksRite.com "Denis" wrote in message ... Ron Copied in the function, changing the DOB for DateofBirth field I have in my batabase but it came up with an error highlighting "Then". Can you advise? Regards Denis "Ron Weiner" wrote: If you want a simple function that ONLY returns an age in Years and months you can find one here http://www.worksrite.com/GetAge.htm -- Ron W www.WorksRite.com "Denis" wrote in message ... How can I work out ages in years and months from an "DateofBirth" field in a access database report? This is the first time i have tried to calculate this so would like some guidance please. Regards Denis |
#7
|
|||
|
|||
Ages
If you have a text box on your report that you want to hold the Age in Years
and months then set the controlSource of that text box to: =getagestr([DateOfBirth],Date). This assumes that you have a column in the RecordSource of the report whose name is DateOfBirth, and that column is a DateTime data type. If the RecordSource column DateOfBirth is a Text data type, then set your textbox ControlSource to: =getagestr(Format([DateOfBirth],"mm,dd,yyy"),Date). -- Ron W www.WorksRite.com "Denis" wrote in message ... Ron The database is for employees with a field "DateofBirh" completed dd/mm/yyyy and I am trying to work out their ages in months yy and mm. This is due to age requirements for some positions that are need to be filled. Regards Denis "Ron Weiner" wrote: How are you calling the function. As Written it was designed to be called with two parameters the Start Date (BornOnDate) and the End Date (typically today's Date). So when I call it like this: ? getagestr("1/30/47",date) from the Immediate Window it prints 58y-10m Which is my current age. Exactly how are you attempting to use this function? -- Ron W www.WorksRite.com "Denis" wrote in message ... Ron Copied in the function, changing the DOB for DateofBirth field I have in my batabase but it came up with an error highlighting "Then". Can you advise? Regards Denis "Ron Weiner" wrote: If you want a simple function that ONLY returns an age in Years and months you can find one here http://www.worksrite.com/GetAge.htm -- Ron W www.WorksRite.com "Denis" wrote in message ... How can I work out ages in years and months from an "DateofBirth" field in a access database report? This is the first time i have tried to calculate this so would like some guidance please. Regards Denis |
#8
|
|||
|
|||
Ages
Oooopppssss...
Typo on the format string should be =getagestr(Format([DateOfBirth],"mm,dd,yyyy"),Date). Sorry!! -- Ron W www.WorksRite.com "Ron Weiner" wrote in message ... If you have a text box on your report that you want to hold the Age in Years and months then set the controlSource of that text box to: =getagestr([DateOfBirth],Date). This assumes that you have a column in the RecordSource of the report whose name is DateOfBirth, and that column is a DateTime data type. If the RecordSource column DateOfBirth is a Text data type, then set your textbox ControlSource to: =getagestr(Format([DateOfBirth],"mm,dd,yyy"),Date). -- Ron W www.WorksRite.com "Denis" wrote in message ... Ron The database is for employees with a field "DateofBirh" completed dd/mm/yyyy and I am trying to work out their ages in months yy and mm. This is due to age requirements for some positions that are need to be filled. Regards Denis "Ron Weiner" wrote: How are you calling the function. As Written it was designed to be called with two parameters the Start Date (BornOnDate) and the End Date (typically today's Date). So when I call it like this: ? getagestr("1/30/47",date) from the Immediate Window it prints 58y-10m Which is my current age. Exactly how are you attempting to use this function? -- Ron W www.WorksRite.com "Denis" wrote in message ... Ron Copied in the function, changing the DOB for DateofBirth field I have in my batabase but it came up with an error highlighting "Then". Can you advise? Regards Denis "Ron Weiner" wrote: If you want a simple function that ONLY returns an age in Years and months you can find one here http://www.worksrite.com/GetAge.htm -- Ron W www.WorksRite.com "Denis" wrote in message ... How can I work out ages in years and months from an "DateofBirth" field in a access database report? This is the first time i have tried to calculate this so would like some guidance please. Regards Denis |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
dates of birth and ages fields | ammeg | General Discussion | 1 | June 24th, 2005 02:27 PM |
How can I create a formula using 2 %'s for 2 sets of ages in the . | AB | General Discussion | 2 | March 3rd, 2005 06:12 AM |
Ages of participants | Desmond | Running & Setting Up Queries | 1 | July 14th, 2004 11:51 PM |
Need to Calculate Employee Ages | Motra | Worksheet Functions | 3 | June 4th, 2004 04:26 PM |
Formula for ages from DOBs needed. | calcatron | Worksheet Functions | 3 | January 29th, 2004 09:50 PM |