I have two DatePicker (Start and End) in my app, for instance I selected from Feb 15 to Feb 16, see below:
From: Tuesday, February 15, 2022
To: Wednesday, February 16, 2022
As part of the app, a collection of dates DateRange is created with the From and To dates for different purpose.
I noticed that the dates in the collection have the current time, as below:
First(DateRange).Date shows as:
Start 2/15/2022 11:18 AM
Last(DateRange).Date shows as
End 2/16/2022 11:18 AM
*time when I run the app
When it is Patch-ed to SharePoint, I use as:
{
From: First(DateRange).Date,
To: Last(DateRange).Date,
}
Therefore date/time fields are stored in SharePoint with 11:18 AM time (time when app was run). My request is to store the dates as below example:
Start 2/15/2022 12:00 AM
End 2/16/2022 11:59 PM
What instruction(s) should I add to store the dates in SharePoint as it?
Thank you