Showing posts with label SP2010. Show all posts
Showing posts with label SP2010. Show all posts

Friday, August 29, 2014

Calculated Fields formulas used in SharePoint

Get Week of the year
=DATE(YEAR([Start Time]),MONTH([Start Time]),DAY([Start Time]))+0.5-WEEKDAY(DATE(YEAR([Start Time]),MONTH([Start Time]),DAY([Start Time])),2)+1

First day of the week for a given date:
=[Start Date]-WEEKDAY([Start Date])+1

Last day of the week for a given date:
=[End Date]+7-WEEKDAY([End Date])

First day of the month for a given date:
=DATEVALUE(“1/”&MONTH([Start Date])&”/”&YEAR([Start Date]))

Last day of the month for a given year (does not handle Feb 29). Result is in date format:
=DATEVALUE (CHOOSE(MONTH([End Date]),31,28,31,30,31,30,31,31,30,31,30,31) &”/” & MONTH([End Date])&”/”&YEAR([End Date]))
Day Name of the week : e.g Monday, Mon
=TEXT(WEEKDAY([Start Date]), “dddd”)
=TEXT(WEEKDAY([Start Date]), “ddd”)


The name of the month for a given date – numbered for sorting – e.g. 01. January:
=CHOOSE(MONTH([Date Created]),”01. January”, “02. February”, “03. March”, “04. April”, “05. May” , “06. June” , “07. July” , “08. August” , “09. September” , “10. October” , “11. November” , “12. December”)

Get Hours difference between two Date-Time :
=IF(NOT(ISBLANK([End Time])),([End Time]-[Start Time])*24,0)

Date Difference in days – Hours – Min format : e.g 4days 5hours 10min :
=YEAR(Today)-YEAR(Created)-IF(OR(MONTH(Today)
DAY(Today)
<=MONTH(Created),DAY(Today)
>=DAY(Created)),12,IF(AND(MONTH(Today)>MONTH(Created),DAY(Today)
“&Today-DATE(YEAR(Today),MONTH(Today)-IF(DAY(Today)

You can get Get more formulas from
http://office.microsoft.com/en-us/sharepointtechnology/HA011609471033.aspx

OR

http://msdn.microsoft.com/en-us/library/bb862071.aspx

Reference Page link:

Wednesday, October 31, 2012

Print a List item in SharePoint 2010


How to print a single list item in SharePoint 2010

You may need to print a single list item in SharePoint 2010. However, this functionality does not exist unless you print with Excel, which isn't what you are looking for anyway.

Following way to print the list item steps, can be found in multiple blogs... ;)

So, how do we go about accomplishing this?


  1. Open a List
  2. Hit the List tab
  3. Click the Form Web Parts dropdownlist
  4. Choose “Default Display Form”
  5. At the top of the Page – Insert Tab, Click the Web Part button to add a new Content Editor web part (CEWP).
  6. From Categories choose “Media and Content” > “Content Editor” and add it to the main section of the page.
  7. Click the “Click here to add content” and then click the HTML button in the Ribbon to bring up the Edit source code window.
  8. In the window add the following code to display a Print Button at the top of the list item window. 

         


  • Ignore any warnings.
  • Next, hit the Page tab at the top of the page to view the List item. You should see the Print button.

  • Hit the Print button to print just the list item.

  • So there you go, with just a little tweaking you can print a single List item.