Reduce one day in SharePoint list Column using PowerShell

In this article we can able to see how to reduce one day less for a particular date column in SharePoint list using PowerShell.

Copy data from one list to another list in SharePoint using PowerShell
We migrated the content from lotus notes to SharePoint, due to some time Zone difference we got one last more for all the items in the list. For that using PowerShell we reduced the one day.
Add-PSSnapin microsoft.sharepoint.powershell
$spWeb = Get-SPWeb ""
write-host $spweb

write-host $lList
$spItems = $List.GetItems()

foreach($spItem in $spItems)


    $datevalue = $spItem["DateColumnName"].AddDays(-1);

$spItem["DateColumnName"] = $datevalue
$modifiedBy = $spItem["Editor"]
$modifieddate = $spItem["Modified"]
$spItem["Editor"] = $modifiedBy
$spItem["Modified"] = $modifieddate
SharePoint Online Real Time Training Contact: JLAKSHMITULASI@GMAIL.COM

Lakshmi Tulasi Jasti

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment


Post a Comment