Feb 23, 2023 02:53 PM - edited Feb 23, 2023 02:54 PM
Hello,
as the subject says i'm looking to write a formula which returns a childs age at 1. august 2023 based on their birthday. i'm currently using a formula which gives me some info, but i would really like to know if there are other possibilities.
This is what i use today:
Solved! Go to Solution.
Feb 23, 2023 04:04 PM
Hi Eivinj,
Try using a formula like this:
Feb 23, 2023 04:04 PM
Hi Eivinj,
Try using a formula like this:
Feb 24, 2023 01:01 AM - edited Feb 24, 2023 01:12 AM
Thank you! This worked like a charm.
I had to reverse the order of the fields(use Planlagt overgang first, then Født) in order to return positive numbers. As the original solution returned negative numbers.
Now, a next level task:
one child counts as two, until they are 3 years old, then they count as one.
However, they count as one from august in the year that they celebrate their third birthday. And in addition to that, i want the "count" to be based on {Planlagt overgang} and obviously their birthday.
For example:
If a child is 2 years now, they count two "spots".
The child has birthday in october 2023.
As soon as 1. august passes - they count as "one spot"
What this means is that i will know when a child counts as one when the planned class switch is scheduled 🙂 god this gott messy.
Feb 24, 2023 11:44 AM
Hi Eivinj,
I understood your conditions to mean that as soon as child turn 3 they count as 1 and for children born after august 1st 2023 they count as 1 after august 1st 2023.
Typically went I solve complex (and messy) problems like this I break out the formula into tangible steps in different fields, which helps me keep track of solving the issue. I will share my process as I think it will be helpful.
Below is a screenshot of my base:
I used "Today's Date" as a regular date field so I could test the different conditions, in reality you can replace this field in all the formulas it shows up in with the function TODAY( ). I also changed {Planlagt overgang} to todays date in "Age" to help identify what the desired result should be. The final field that computes the result you would like is "Count".
Here is a list of what each field is and their respective formula:
Født Date of Birth (date field)
Today's Date date field (explained above)
Age