Solved

count days

Posted on 2011-03-22
7
1,336 Views
Last Modified: 2012-08-13
Is there a way to count days from a date?
I want it to increment daily?
0
Comment
Question by:karen2662
[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
  • 4
  • 3
7 Comments
 
LVL 6

Expert Comment

by:ThatSharepointGuy
ID: 35193813
Karen,

Where exactly do you want to do this?  Which version of SharePoint are you using?  Was this to be in a PowerShell script, in a date range in a list, etc?  

We'll need more information to help you achieve your goal ;-)
0
 

Author Comment

by:karen2662
ID: 35197687
Sharepoint 2007
date field
I would like to have a counter or field that would increment daily from the date field.
I want to show how many days since the task was assigned.
When the task is completed the user will enter a completion date and then the counter/field could stop.
0
 
LVL 6

Expert Comment

by:ThatSharepointGuy
ID: 35199206
Do you have access to SharePoint Designer?  If so, this looks to be exactly what you're looking for, with the added bonus of color coding the list items based on the difference between the date assigned and the date due.

http://blog-sharepoint.blogspot.com/2009/05/data-view-conditional-formatting-using.html

Otherwise, you're basically going to use filters as mentioned in this article:
http://blog.pentalogic.net/2008/10/advanced-sharepoint-view-and-filters/

I have never done this myself, but from what I understand, it's not an easy task with out-of-the-box SharePoint features.  Mainly because I don't think it will let you display it, just set up views for stuff like "tasks due in the next 7 days", "Tasks due today", etc.  I could be wrong, and would actually set it up here myself, but I'm running SP2010 and I'm not sure if there are differences with filters between the two.  

I'd read at least that second article, and try messing around to see if you can't get it to work.
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
LVL 6

Expert Comment

by:ThatSharepointGuy
ID: 35199335
=Today() > [Due Date]

Open in new window


This would be what you might try to use.  I'd say, toss this into the formula section of the list, or the validation settings, and see what happens.
0
 

Author Comment

by:karen2662
ID: 35199602
Thanks but either I am misunderstanding your answer or my question was not clear.
my task would have a date and I would like a field that increments daily until a completed date is entered.
Task 1
   I would like a counter that starts counting until a completed date is entered.
date started  03/14/2011  
so the field would increment each day so iif today is 3/17  the field should have a 2
the next day it would increment to 3
when the completed date is entered
completed date  3/20/2011  the counter should show 6
0
 
LVL 6

Accepted Solution

by:
ThatSharepointGuy earned 500 total points
ID: 35199897
Karen,

I understood your question, and I've been playing with it on my test server here...but I don't believe that it's something that comes with the default install of SharePoint.

So my answer would be "no, you can't do that with 'Out of the Box' SharePoint".

BUT

You can create a custom field if you are a developer (or know someone who is) that could take the [Date Created] field and count from there until the [Date Completed] value is not null (meaning, stop counting when someone completes the task), just like you want.  So it IS possible, but only if you're willing to write the code to do it.  
0
 

Author Closing Comment

by:karen2662
ID: 35200017
thanks
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Pimping Sharepoint 2007 without Server-Side Code Part 1 One of my biggest frustrations with Sharepoint 2007 in the corporate world is that while good-intentioned managers lock down the more interesting capabilities of Sharepoint programming in…
When using a search centre, I'm going to show you how to configure Sharepoint's search to only return results from the current site collection. Very useful when using Office 365 with multiple site collections.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

622 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