Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have two date fields(Joining Date, Today()). I want to calculate the time span for how long the person is with the company, i.e. the time duration in the form of- ?? Years ??Months and ??days.
Is there any simple formula that can help? or i will have to do it manually(getting the difference in days and then divide it by 365......)?
Thanks and regards,
tresesco
Hello Tresesco,
For just years, you can use
=Age(Date(Today()), Date('01/01/2008'))
Days
=Num(Date(Today()) - Date('01/01/2008'))
The whole
=timestamp(Date(Today()) - Date('01/01/2008'), 'YY MM DD hh:mm:ss')
Hope that helps!
Hi Tresesco,
I think you can use as following
age(today(),Joining Date) as duration
Regards,
Nilupa
Hello Tresesco,
For just years, you can use
=Age(Date(Today()), Date('01/01/2008'))
Days
=Num(Date(Today()) - Date('01/01/2008'))
The whole
=timestamp(Date(Today()) - Date('01/01/2008'), 'YY MM DD hh:mm:ss')
Hope that helps!
Thanks Baeyens,
your timestamp function has given me the solution:
Finally i used Variable1 =timestamp(Date(Today()) - Date('DateOfJoining'), 'YY MM DD hh:mm:ss')
=left(Variable1,2)& ' Years ' & Mid(Variable1,3,2) &' Months '&Mid(Variable1,6,2)&' Days'
and i got the desired result.
thanks once again.
Hi,
Though i thought that i got the solution, it was with a little error. The differences were coming one month+ error. For example: 1st jun 2010 - today() giving 3 months 27days
1st sep 2008 -today() giving 1 Year 12 Months 25 days
So I had to subtract 1 from the month manually. Does anybody have any explanation.....?
Because timestamp(1, 'DD/MM') = 01/01 (1st Jan) and timestamp(32, 'DD/MM') = 01/02 (1st Feb). Same with date().
I think you just need to subtract 1 as you found out.
Jonathan
Hi i want to calculate an age from an ID number... Please advise
can you please explain your scenario?
regards, tresesco