Hi all,
I have an app that is connected to a SQL DB. OnSelect of a button I have a Flow that executes a stored procedure and returns the information to PowerApps. In the response part of the Flow there is a TimeDate2 (2) column from SQL being returned as a string in JSON, this gives the response in the following format: "YYYY-MM-DDTHH:MM:SS.ss". I have tried using "Text(ThisItem.TSP_MsgTime, DateTimeFormat.ShortDateTime)" in PowerApps to format the date, but it is still showing as in the Flow response. Any ideas how I can get it to format properly? I would like it in the format DD/MM/YYYY HH:MM:SS, without the T in the middle and the final milliseconds.
Thank in advance.
Awesome. Make sure to close the thread if your issue is solved 😸
Haha, yes, that's crazy!
Thanks
Yes, you can definitely convert into a datetime and then apply a TEXT function.
With( {FlowYear:Value(Left(Label1.Text,4)), FlowMonth:Value(Right(Left(Label1.Text,7),2)), FlowDay:Value(Right(Left(Label1.Text,10),2)), FlowHours:Value(Right(Left(Label1.Text,13),2)), FlowMin:Value(Right(Left(Label1.Text,16),2)), FlowSec:Value(Right(Left(Label1.Text,19),2)) }, Text(
DateAdd(
DateAdd(
DateAdd(
Date(FlowYear,FlowMonth,FlowDay),FlowHours,Hours),
FlowMin,Minutes),
FlowSec,Seconds),
"dd/mm/yyyy hh:mm:ss"
) )
Crazy, right?
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Hi,
Thank you.
So you think there is no way that PowerApps can recognise it as a datetime in order to make use of all the different formats available?
Here's my suggestion
With( {FlowDT:Label1.Text}, Right(Left(FlowDT,10),2)&"/"& Right(Left(FlowDT,7),2)&"/"& Left(FlowDT,4)&" "& Right(Left(FlowDT,13),2)&":"& Right(Left(FlowDT,16),2)&":"& Right(Left(FlowDT,19),2) )
It will convert this text
2019-10-28T15:14:54.15
Into this text
28/10/2019 15:14:54
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Hi @mdevaney,
Here is an example:
Can you please provide a specific example of a date/time returned by flow for the forum members to test when trying the conversion?
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473