web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / sql powerapps and flow
Power Apps
Answered

sql powerapps and flow

(0) ShareShare
ReportReport
Posted on by 231

Hello...

 

Need some help...

 

I'm using flow to get data from sql into powerapps, and it works fine. But... 

 

I understand that Json does not support date and time. So when i get the data from the sql server en send it back to powerapps using response i have problems with date and time. 

 

Any idea?

 

The concept is this idea from mr Dang: https://www.youtube.com/watch?v=K_H5r0nzwy4

 

So how can i convert string to date-time in powerapps collection using add collums or convert in flow?

 

thank you

 

 

 

 

 

 

 

Categories:
  • SeanHenderson Profile Picture
    1,104 on at

    I don't think you are going to be able to get around the JSON issue.

    I would recommend creating a Dataflow to get your data from SQL into CDS. This has the added benefit of using CDS in your app, which provides a lot more functionality.

  • Frans_365CH Profile Picture
    231 on at

    Thank you. 😊

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Frans_365CH ,

    Do you want to convert the date time strnig value into a date time value within the collection in your app?

     

    Based on the needs that you mentioned, I think you should convert the date time value within your app rather than in your flow. I have made a test on my side, please consider take a try with the following workaround:

    Please consider take a try with the following formula (set the Items property of a Data Table control to following😞

    AddColumns(
     ReturnedCollection,
     "DateTimeValue",
     DateTimeValue(DateTimeColumn, "en-US") // DateTimeColumn represents the date time column in your SQL Table
    )

    Note: Within the second argument of the DateTimeValue function, please type your own local language code (e.g. "en-US", "en-GB", ...).

    If you want to store above result into a new collection, please take a try with the following formula:

    ClearCollect(
     FinalCollection,
     AddColumns(
     ReturnedCollection,
     "DateTimeValue",
     DateTimeValue(DateTimeColumn, "en-US") // DateTimeColumn represents the date time column in your SQL Table
     )
    )

     

    If there is a time zone offset between the date time value in your SQL Table and the date time value in above FinalCollection, I think the DateAdd function and TimeZoneOffset function could achieve your needs:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-dateadd-datediff#converting-from-utc

     

    I also agree with @SeanHenderson 's thought almost, you could consider sync data from your SQL Server into a CDS Entity using Dataflows functionality directly. Then you could create an app based on the CDS Entity directly without flow.

    Dataflows in PowerApps

     

    Best regards,

  • Frans_365CH Profile Picture
    231 on at

    Thank you!!!

     

    I'm using Flow so we can make the solution GDPR proof. Is CDS also GDPR proof?

     

    And thank you for your detail information over add collumms. This helps me a lot.

     

    Regards,

     

    Frans

     

  • Frans_365CH Profile Picture
    231 on at

    I was very close... try a lot, but this works, and of course i must use dateadd for the timezone issue...

     

    Thank you very much!!! 🙂

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 139

Last 30 days Overall leaderboard