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 Automate / How to set up a date f...
Power Automate
Unanswered

How to set up a date field in SQL so it will work with Power Automate and Power Apps

(0) ShareShare
ReportReport
Posted on by 2 Moderator

Hello,

 

I am setting up an MSSQL onprem server and want to have a date column in one table.

 

What I need to do with it:

1. PowerApps needs to write the current Date and Time into records stored in the SQL server

2. PowerApps needs to display the date (as dd.MM.yyyy) from those records

3. PowerApps needs to calculate the number of days between today and the date stored in the records

4. PowerAutomate needs to calculate the number of days between today the date stored and delete records that are older than 15 days and change a value in a record in a different table

 

In a test environment I have everything working with a VARCHAR in SQL that displays yyyy-mm-dd hh:mm:ss

Powerapps works nicely with it and in Power Automate I can create an Odata filter query that for all records that contain today's yyyy-mm-dd in that column and it'll delete the records from exactly 14 days ago. However, storing a date a string does not seem 'clean', but I'm no expert.

I'm in Germany, so UTC would be fine for this, but to be future proof, I'd like to understand how to display the proper date/time in my time zone.

If I understand things correctly PowerAutomate and Sharepoint work with 'points in time' that are recorded and then those points in time are translated into a time that is displayed given a specific time zone.

 

So, my question really is: what field type and format should I use when setting up the SQL server to play nice with PowerApps, PowerAutomate and Sharepoint, seeing that I want to be able to calculate dates, days and display the date/time in my timezone. (The database does not have contact with any other time zones)

 

Thank you guys.

Categories:

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 Automate

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 211 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 190

Last 30 days Overall leaderboard