Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Hi,

Can you please help with a calculation that will subtract the visit date - date of birth.

The results shall be provided to the user in years, months, weeks, and days. I have attached a small file for testing.

thank you so much who ever you are....

Date_Calc.zip

Edited by Guest

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

  • Author

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?

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 ?

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

Maria,

I added a field with Lee's calc. Just change visit date and it will change the year month and day.

Hope this helps you get an idea how it works.

Dean

Edited by Guest

  • Author

thank you.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.