Hi @Mohammad Qasim ,
The DateTime in SharePoint needs to be in specific format : yyyy-MM-ddTHH:mm:ssZ
. The variable dtexppiry
should be configured like the below:
string dtexppiry=DateTime.Today.ToString("yyyy-MM-ddTHH:mm:ssZ");
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.