Help

Calculating Korean age

Solved
Jump to Solution
3348 2
cancel
Showing results forΒ 
Search instead forΒ 
Did you mean:Β 
momentsgoneby80
7 - App Architect
7 - App Architect

Hi!
I have a formula that works awesomly to calculate international age (see below).

IF(
				{πŸ†” Birthday}=BLANK(),
				' (N/A)', 
				IF(
					{πŸ†” Death}=BLANK(),
					IF({πŸ†” Birthday},' ('&DATETIME_DIFF(TODAY(), {πŸ†” Birthday}, 'years')&')'),
					IF({πŸ†” Birthday},' (✟ '&DATETIME_DIFF({πŸ†” Death}, {πŸ†” Birthday}, 'years')&')')
				)
			)

{ :id: Birthday} is a date field.
I’ve been trying to adapt this formula to calculate Korean age.
I would need it to do something like

IF({πŸ†” Birthday},IS_BEFORE(TODAY(),DATETIME_FORMAT({πŸ†” Birthday}, 'MMDD'),+2 'years',+1 'Years'))

…if that makes sense? I’ve been banging my head for too long that even the above might have an error. So in plain English: if today is before a persons birthday (but after January 1) I want it to add 2 years to their age. If it’s after their birthday I want it to add 1 year. I just can’t get it to actually work and I wouldn’t be at all suprised if it’s all down to my nesting, which I’m horribly at.

I would be endlessly gratful for any and all help with this. It would save me a huge head ache. Literally.

1 Solution

Accepted Solutions
kuovonne
18 - Pluto
18 - Pluto

This is an interesting case where there can be multiple approaches.

I looked up calculating Korean age and discovered that a baby is considered 1 year old at birth and gains one year every January 1. I found this method of calculating Korean age is easier than making calculations based on the current date.

Here is my formula. It calculates the age in months from Jan 1 of the current year, divides that by 12 to convert to years, then finds the next largest integer.

IF({Date},
  CEILING(
    DATETIME_DIFF(
      TODAY(), 
      DATETIME_PARSE("1/1/" & YEAR({Date}), "D/M/YYYY"), 
      'months'
    )
    / 12
  )
)

This formula does not take into account the age of a person who has died, which your original formula does. However, it looks like you understand formulas well enough to implement that part yourself. (One option would be to calculate the ages of deceases people and of live people in different fields.)

See Solution in Thread

2 Replies 2
kuovonne
18 - Pluto
18 - Pluto

This is an interesting case where there can be multiple approaches.

I looked up calculating Korean age and discovered that a baby is considered 1 year old at birth and gains one year every January 1. I found this method of calculating Korean age is easier than making calculations based on the current date.

Here is my formula. It calculates the age in months from Jan 1 of the current year, divides that by 12 to convert to years, then finds the next largest integer.

IF({Date},
  CEILING(
    DATETIME_DIFF(
      TODAY(), 
      DATETIME_PARSE("1/1/" & YEAR({Date}), "D/M/YYYY"), 
      'months'
    )
    / 12
  )
)

This formula does not take into account the age of a person who has died, which your original formula does. However, it looks like you understand formulas well enough to implement that part yourself. (One option would be to calculate the ages of deceases people and of live people in different fields.)

Oh, CEILING(). Have never used that one before and though I’m sure I’ve seen it on noumerous occations while browsing the Formula field reference page it hadn’t stuck in memory. Now I’m curious to play around with it to first fully understand it and then find multiple uses for it.

Yes, Korean age is a bit funny as it’s uniqe in it’s approach. As Korea has a highly hierarcial society figuring out someone’s age is important though. Everyone born the same year as you are automatically the same age and a β€˜friend’. Anyone older require words/speech of a different hierachy. I’m learning, but oh how I wish it was easier. Very intresting though.

Thank you so much for your help.