Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have 2 fileds,start date and end date.
How can I calculates the numbers of days,months and years difference between 2 dates.
Thanks in advanvce.
If you're OK with approximate definition of Year = 365 days, and Month = 30 days, this will work:
= div(interval(End - Start, 'D'),365) & ' Years '
& div(mod(interval(End - Start, 'D'),365),30) & ' Months '
& mod(mod(interval(End - Start, 'D'),365),30) & ' Days '
Edit: see also this thread. The question is a little different, but maybe helpful in your case:
If you're OK with approximate definition of Year = 365 days, and Month = 30 days, this will work:
= div(interval(End - Start, 'D'),365) & ' Years '
& div(mod(interval(End - Start, 'D'),365),30) & ' Months '
& mod(mod(interval(End - Start, 'D'),365),30) & ' Days '
Edit: see also this thread. The question is a little different, but maybe helpful in your case: