Hi there.
As discuss here: Solved: Create a date with get item() and a specific time. - Power Platform Community (microsoft.com)
I had some troubles with datetime variables (always a nice gym) but we manage the issue thanks to your advices.
Now I have to make a copy of my sharepoint element, to do it, i'm using "create element" function giving him the same input information of my get item() put at the begin of the flow.
We start from an element with a Start and an End fields. The End field should be empty.
Then, my flow close the item putting a value on End field (problem solved in topic linked above) and it creates a copy with the Start field valued as "DayAfter 00:00:00" and End field empty. (in little words, I split the event at the midnight).
So, we start from this:
This is the flow composed by a getItem() setted to take the most recent element (so, array with dimension 1):
then a flow piece discussed in the above topic close the element at 23:59:59 of the same day.
Immediatly after this, I compose another daytime which is the Start of the new event:
and after a conversion, I create the new element:
and, as aspected, we have this (actually, sometimes it creates another row with Start: 04/02/2023 00:00 and End: 03/02/2022 23:59:59, I dont't know why):
Now, If I run the flow again, we have this:
When I aspected to find the row with ID=104 closed at 04/02/2023 23:59:59 and the ID=105 with Start = 05/02/2023 00:00:00.
The getItem() output of my second round of the flow is this and is wrong:
Do you have some ideas of what is happening?
Thanks.
Solved! It was a region configuration, with a few conversions I did it 😉