Reputation: 11
i am trying to built an app in powerapps which will send an event in outlook calendar. i have create a flow i test it and works fine but i have to insert the date in "yyyy/mm/dd" format. when i try to add the flow in powerapps, the powerapps send the date in "dd/mm/yyyy" format and the flow doesn't recognize it as a date and doesn't send the event in calendar. i have insert this on the button action...
Προσθήκηστοημερολόγιο.Run(DateTimeValue(DateValue1.SelectedDate & " " & HourValue1.SelectedText.Value & ":" & MinuteValue1.SelectedText.Value) & DateTimeFormat = "yyyy/mm/dd hh:mm:")
thank you in advance!
Upvotes: -1
Views: 4257
Reputation: 11
at the end i created an automatic flow to create the event when an item is being added in the sharepoint list and works fine. thank you!
Upvotes: 0
Reputation: 87258
Arguments from Power Apps to flows are always of type strings, so you don't need the DateTimeValue (which converts from strings to date/time). You need the Text function, which allows you to format a date/time value in a specific way, something like the expression below:
Προσθήκηστοημερολόγιο.Run(
Text(DateValue1.SelectedDate, "yyyy/mm/dd") & " " &
Text(
Time(HourValue1.SelectedText.Value, MinuteValue1.SelectedText.Value, 0),
"hh:mm:ss"))
If the types of [HourValue1 | MinuteValue1].SelectedText.Value is not a number (i.e., they are strings), then you may be able to concatenate them directly instead of using the Text and Time functions:
Προσθήκηστοημερολόγιο.Run(
Text(DateValue1.SelectedDate, "yyyy/mm/dd") & " " &
HourValue1.SelectedText.Value & ":" & MinuteValue1.SelectedText.Value & ":00")
Upvotes: 1