Sep 29 2022 06:35 PM - edited Sep 29 2022 06:36 PM
We are converting some old announcements to News Posts and need to ensure that the Published Date is the same as what they were before.
We can use PowerShell to change the First Published Date which is used to order the posts in a News Webpart, but the date that is shown at the top of the News Post itself uses another internal/hidden field called Published Date (or something like that). We can't find a way to change this. So the First Published Date is fine, but can't get it to show that date on the actual News Post.
Any ideas more than welcome.
Sep 30 2022 12:26 AM
@gjen020 Are you talking about Publish Start Date?
You can add publish start date column to library view and then user below JSON formatting code on this column to edit date:
{
"elmType": "div",
"inlineEditField": "@currentField",
"txtContent": "@currentField"
}
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Sep 30 2022 12:51 AM - edited Sep 30 2022 12:52 AM
Hi,
No this is not what I'm talking about. I'm talking about what's displayed on the actual News Post beneath the title as per the image - not what you can see in the list view.
There are two dates that drive a News Post - Publish Start Date (FirstPublishedDate) is set when you first publish the News Post, but the actual Published Date (Hidden field) is generated each time you publish the News Post. I want that to be changed to an older date (the date of the old announcements I'm converting to a News Post).
Have another look at the image I put in my first post and you'll see what I mean.
Sep 30 2022 01:18 AM
@gjen020 As per the post - EDIT ORIGINAL PUBLISHING DATE IN SHAREPOINT NEWS POSTS:
Unfortunately, I have not found a way to update or replace the Publishing Date value with the First Publishing Date. For some reason this value cannot be updated and SystemUpdate also doesn’t work. While looking for the solution I think I read that it can be done using ShareGate, but I haven’t tried it.
Also check below thread using C# to update published date which might help you: How to display published date column in document library
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
May 09 2023 12:33 PM
May 09 2023 12:42 PM
Jul 03 2023 08:54 AM
Feb 02 2024 12:22 PM