MwTV
MIS
- Mar 9, 2007
- 99
Have a birth date field in a sql server database and interested in calculating the age within a Microsoft Access passthrough query.
Is it possible to use three calculated fields in Access so that I receive the Year,Month and Days portion of the age calculation in three separate columns?
Other option is to construct a function that give me the number of days in one column if the first option is not doable.
Any insight?
I am aware of the MS Excel formula that results in the age as Years Months and Days into one cell as displayed below, where BirthDate is in cell "D4";
=DATEDIF(D4,TODAY(),"y")&" years "&DATEDIF(D4,TODAY(),"ym")&" months "&DATEDIF(D4,TODAY(),"md")&" days"
Thanks in advance.
Is it possible to use three calculated fields in Access so that I receive the Year,Month and Days portion of the age calculation in three separate columns?
Other option is to construct a function that give me the number of days in one column if the first option is not doable.
Any insight?
I am aware of the MS Excel formula that results in the age as Years Months and Days into one cell as displayed below, where BirthDate is in cell "D4";
=DATEDIF(D4,TODAY(),"y")&" years "&DATEDIF(D4,TODAY(),"ym")&" months "&DATEDIF(D4,TODAY(),"md")&" days"
Thanks in advance.