Oct 05 2021 11:19 AM
Device: Mac
Excel product: Microsoft Excel for Mac / Version 16.53 (21091200)
I am conducting survival analysis, and I want to calculate the survival time between the start and first events.
I found many excel functions; however, there is a mild difference in the results, i.e. Fractions.
Here is the function I found:
1- =DAYS(first_event_date,Start_date)/30
2- =DATEDIF(Start_date,first_event_date,"M")
3- =YEARFRAC(Start_date,first_event_date)*12
Here is my data; it is just one event I can apply to the rest.
Starting date: 2005-10-14
First event date: 2007-05-30
Results according to the previous functions:
1- 19.76
2- 19
3- 19.53
My question is, which function I should use to get the most accurate answer.
Thank you,
A
Oct 05 2021 11:29 AM - edited Oct 05 2021 11:48 AM
Solution@Ahmed_Ben_2021 What is "one month"? 28, 29, 30 or 31 days. I'd say an average month equals 365/12 days. Then, the third formula seems to be the best one.
Oct 05 2021 12:10 PM
Oct 05 2021 11:29 AM - edited Oct 05 2021 11:48 AM
Solution@Ahmed_Ben_2021 What is "one month"? 28, 29, 30 or 31 days. I'd say an average month equals 365/12 days. Then, the third formula seems to be the best one.