I have the following code inside my remote event recevier, to assing a value for a Date Time field, as follow:-
public SPRemoteEventResult ProcessEvent(SPRemoteEventProperties properties)
{
using (ClientContext context = Helpers.GetAppOnlyContext(siteUrl))
{
if (properties.ItemEventProperties.AfterProperties["ProjectApproveDelay"] != null && properties.ItemEventProperties.AfterProperties["ProjectApproveDelay"].ToString().ToLower() == "yes" )
{
result.ChangedItemProperties.Add("ProjectEstimatedCompletionCurren0", DateTime.Now);
}
but this will return the following error:-
Invalid date/time value. A date/time field contains invalid data. Please check the value and try again.
although both the server hosing the remove event receiver + the site collection follow the UK time standard. and the DateTime.Now will be something as follow 27/01/2020 23:01:32