OpenOffice에서 일-월-년 단위로 나이를 찾아야 합니다.
DATEDIF()
Microsoft Excel에 있습니다 . 두 날짜 사이의 일/월/년 차이를 찾는 데 사용할 수 있습니다.
Age Calculation
You can calculate a persons age based on their birthday and todays date.
The calculation uses the DATEDIF() function.
The DATEDIF() is not documented in Excel 5, 7 or 97, but it is in 2000.
(Makes you wonder what else Microsoft forgot to tell us!)
Birth date : 01-Jan-60
Years lived : 52 =DATEDIF(C8,TODAY(),"y")
and the months : 4 =DATEDIF(C8,TODAY(),"ym")
and the days : 30 =DATEDIF(C8,TODAY(),"md")
아래 공식으로 계산할 수 있지만, 월 계산이 번거롭습니다.
Another way to calculate age
This method gives you an age which may potentially have decimal places representing the months.
If the age is 20.5, the .5 represents 6 months.
Birth date : 01-Jan-60
Age is : 52.41 =(TODAY()-C23)/365.25
답변1
그냥 사용YEARS()
그리고MONTHS()
세트의 함수날짜/시간 기능:
=YEARS(01-Jan-60,NOW,1)
그리고
=MONTHS(01-Jan-60,NOW,1)
경과된 연도와 개월의 합계를 알려줍니다. 연도 합계에서 남은 개월 수를 얻으려면 모듈로(Calc에서:MOD()
):
=MOD(MONTHS(01-Jan-60,NOW,1), 12)
총 개월 수를 12로 나눈 후 남은 4개월을 반환합니다.
물론 위 수식에 포함된 날짜를 셀 참조로 바꿀 수 있습니다. =YEARS(A1,A2,1)
셀 A1과 A2에 날짜가 포함되어 있다고 가정합니다.