• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 970
  • Last Modified:

Get Diff between Today and end of year in calculated value ?

HI, How to get  date difference between Today and  31/12 of current year  ? i tried  DATEDIF (Today - "31/12/2012" ,"ym") but i got error  , whats the correct statement to do this ? Thanks
0
pgirardier
Asked:
pgirardier
1 Solution
 
Rainer JeschorCommented:
Hi,
you can not use [TODAY] in a calculated column.

There is a "hack" which works in MOSS 2007 and SharePoint 2010 but is definitely not supported from MS:
http://sharepoint-comments.com/2011/03/04/using-today-or-me-in-sharepoint-calculated-columns/

Short How To:
1. Create a column named "Today" (Text)
2. Create calculated column "DayToEOY" with formula
=DATEDIF(Today,DATE(YEAR(Today),12,31),"D")
3. Delete column "Today"

HTH
Rainer
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now