Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to subtract dates in SharePoint 2007 columns?

Posted on 2013-05-15
8
Medium Priority
?
785 Views
Last Modified: 2013-05-15
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...
0
Comment
Question by:Stiebel Eltron
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 22

Expert Comment

by:Haresh Nikumbh
ID: 39167522
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
0
 

Author Comment

by:Stiebel Eltron
ID: 39167528
@takecoffe, yes, but we didn't get any possible solution for our query... :(
0
 
LVL 44

Accepted Solution

by:
Rainer Jeschor earned 2000 total points
ID: 39167552
Hi,
here we go:
=DATEDIF([Date start], [Current date], "y") & " yrs, " & DATEDIF([Date start], [Current date], "ym") & " months and " & DATEDIF([Date start], [Current date], "md") & " days"

Open in new window

0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
LVL 44

Assisted Solution

by:Rainer Jeschor
Rainer Jeschor earned 2000 total points
ID: 39168014
And thats how it looks like:
Sample data - resultsHTH
Rainer
0
 
LVL 22

Expert Comment

by:Haresh Nikumbh
ID: 39168024
Cool
0
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 39168246
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
0
 

Author Comment

by:Stiebel Eltron
ID: 39170237
@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... :)
0
 

Author Closing Comment

by:Stiebel Eltron
ID: 39170239
Thank you so much RainerJ! That is what we need... :)
but we need to search for the 'TODAY' column, that will update automatically...
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a serious pitfall that can happen when deleting shapes using VBA.
New style of hardware planning for Microsoft Exchange server.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question