I have a custom list with field of type DateOnly named ExpiryDate:-
Here is the site regional settings:-
now i have noted if we change the ExpiryDate to accept Date-&-time then we change it back to Date-Only, the date stored in the SharePoint will have a time associate with it. so when we want to get items using the REST API with expiry date equal for example 2023-05-07
we will get wired results, because SharePoint will only search the items created at 2023-05-07T00:00:00Z
.. so is it safer to get the items using the Api query as follow: -
/items?$filter=(ExpiryDate ge '2023-05-07T00:00:00Z' and ExpiryDate le datetime'2023-05-07T23:59:59Z')
instead of:-
/items?$filter=(ExpiryDate eq '2023-05-07')
Any advice?