Jump to content
Server Maintenance This Week. ×

Please help with date of birth calc.


This topic is 6484 days old. Please don't post here. Open a new topic instead.

Recommended Posts

This question comes up from time to time. Do a search for [color:blue]+Birthday +Calculation as the [color:blue]Keywords, with or without my name as the username, and you will find many calculations that will provide the bases of what you are needing.

Here is one of the most recent threads Link that should get you going. Just replace the [color:red]Get (CurrentDate) with your [color:red]visit field.

HTH

Lee

Link to comment
Share on other sites

Hi,

Thanks for the resource but i tried copying your code into my db into the fied age_years and no luck.

I tried your code but substituted your currentdate field with my vis_date field and when i click ok i get a pop up message saying "This parameter is an ivalid get function". This is the code i used.

GetAsNumber(Year(Get(vis_Date)) -

Year(dateofbirth) - Case(Get(visDate) <

Date(Month(dateofbirth); Day(dateofbirth); Year(Get(vis_Date))); 1; 0)) & " Years, "

Would you know why it is not working?

Link to comment
Share on other sites

Year( vis_date ) - Year( dateofbirth ) - ( vis_date < Date ( Month ( dateofbirth ) ; Day ( dateofbirth ); Year ( vis_date ) ) ) & " Years, "

result text.

BTW: this covers only the first part of your question :) how many years ?

Link to comment
Share on other sites

Hi Maria,

Compare this to what you were trying to put in the calculation

GetAsNumber(Year(vis_Date)) -

Year(Dob) - Case(vis_Date) <

Date(Month(Dob); Day(Dob); Year(vis_Date))); 1; 0)) & " Years, "

&

GetAsNumber(Mod(Month(vis_Date)) -

Month(Dob) + 12 - Case(Day(vis_Date)) <

Day(Dob); 1; 0); 12)) & " Months, "

&

GetAsNumber(Day(vis_Date)) -

Day(Dob) + Case(Day(vis_Date)) >=

Day(Dob); 0; Day(vis_Date) -

Day(vis_Date))) <

Day(Dob); Day(Dob); Day(vis_Date) -

Day(vis_Date))))) & " Days"

HTH

Lee

Edited by Guest
Link to comment
Share on other sites

This topic is 6484 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.