Link to home
Create AccountLog in
Avatar of Stiebel Eltron
Stiebel EltronFlag for Thailand

asked on

How to subtract dates in SharePoint 2007 columns?

Dear EE experts,

We would like to ask on how to subtract dates in SharePoint 2007 columns? We would like to get the total number of Years/Months/Days that the staff worked in the company.
We have:
3 Columns
- Date Start
- current date
- Total years in work

If we subtract the 'Current date' column to 'date start' column, it will give us different date...

What we want to happen is something like:
= Current date - Date start
= May 15, 2013 - January 2, 2007
then it should give us 6yrs, 5months, & ...

thank you in advance & hope to hear soon...
Avatar of Haresh Nikumbh
Haresh Nikumbh
Flag of India image

have you check this ?

well i am not share point expert but following link may work for above requirement.

http://office.microsoft.com/en-in/windows-sharepoint-services-help/examples-of-common-formulas-HA001160947.aspx
Avatar of Stiebel Eltron

ASKER

@takecoffe, yes, but we didn't get any possible solution for our query... :(
ASKER CERTIFIED SOLUTION
Avatar of Rainer Jeschor
Rainer Jeschor
Flag of Germany image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
One question for me: how do you get the current date?
[TODAY] does not work in calculated columns and the famous hack with a TODAY column is useless as the value will only be calculated when the record is modified.
Thanks.
Rainer
@RainerJ: We're about to ask that question, regarding 'TODAY' column. it's not updating automatically, it's so annoying but what we're doing is we go inside that 'TODAY' column we don't do anything, we just click 'OK' then it will update the today's date... but we're still searching for a solution that will update that 'TODAY' column automatically... hope there is... :)
Thank you so much RainerJ! That is what we need... :)
but we need to search for the 'TODAY' column, that will update automatically...