Calculated Columns – Week of month

Requirement Create a calculated column called ‘Progress Report No’ based on the following format: yyyy.MM.W(WeekOfMonth). e.g. A report created on 4/8/2011 would be, 2011.8.W1 Solution The formula for the calculated column is: =TEXT(Created,”yyyy”)&”.”&MONTH(Created)&”.W”&ROUND((DATEDIF(DATE(YEAR(Created),MONTH(Created),1)-(WEEKDAY(DATE(YEAR(Created),MONTH(Created),1),1))+1,Created+(7-WEEKDAY(Created,2)),”D”)+1)/7,0)  

Continue Reading...

Using Export-SPWeb to export libraries / lists

This is a simple one but many people get the syntax wrong when they try to export individual document libraries / lists. Syntax: To backup a document library called ‘Library1’ in ‘Subsite’. export-spweb <http://sharepoint site/site collection/subsite/ -itemurl “/site collection/subsite/library1” -path c:\sharepoint\library1.cmp To backup a document library called ‘Library 2’ in ‘Site Collection’. export-spweb <http://sharepoint site/site […]

Continue Reading...