I created some dropdowns for choosing a time. The initial idea was to calculate the difference between END & Start time, which would then give a precise time.
The dropdowns look like this:
So we have 4 dropdowns in total: (from left to right) "HourValueStart", "MinuteValueStart", "HourValueEnd", "MinuteValueEnd"
I tried following code first:
Text(Time( Value(HourValueEnd.Selected.Value) - Value(HourValueStart.Selected.Value); Value(MinuteValueEnd.Selected.Value) - Value(MinuteValueStart.Selected.Value); 0))
but once I want to submit this, it returns an error saying "Invalid value '1619823600000' for field 'Einsatzzeit', expected a string".
Then I tried something else:
HourValueStart.Selected.Value & ":" & MinuteValueStart.Selected.Value & " - " & HourValueEnd.Selected.Value & ":" & MinuteValueEnd.Selected.Value
with the goal to display exactly what was given as input. In this case it would have been "06:00 - 07:00". When I submit and go to check, it is just blank. In the spreadsheet (where it is stored once we hit the submit button) the column "Einsatzzeit" is also blank.
Anyone an idea what the issue could be?
Date/Time fields are either Date only or Date/time (not time only). The date is actually stored with a time of 00:00.
Are you using Excel here? If so, you might want to watch this video.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @WarrenBelz ,
yes I am using Excel, because it was a requirement. Thanks for the video!
I got around this, by using normal Text instead of Date, to display the time.
Join us for the next call on August 17, 2022 at 8am PDT.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.