Created Date and Last Modified Date fields in Salesforce objects are audit fields and we can’t edit or change these field directly or through code. You have to contact salesforce support team for them to grant permissions to you to edit or change these fields if needed.
Just create a case through salesforce help for getting the permission to edit these fields. Once salesforce support team grants the access for editing these fields then perform following steps :
1. Open the org.
2. Click on setup.
3. Type user interface in searching box as shown below and click on User interface :
4. Check “Enable “Set Audit Fields upon Record Creation” and “Update Records with Inactive Owners” User Permissions” checkboxes and click on save as shown in image below :
5. Again type permission sets in search box or profiles.
Check boxes of “Set Audit Fields upon Record Creation” and “Update Records with Inactive Owners” :
Now you will be able to change values of Created Date and Last Modified Date fields.
I was so pleased when I saw this post.
But when I spoke to Salesforce Support they said these permissions only allow you to change the Created Date when CREATING NEW records, and does not allow you to update existing records.
I think you need to make this a clearer in this post because several people have cited this post as proof to me that you can modify existing Created Dates, when you actually can’t.