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 / Transform SQL Date var...
Power Automate
Answered

Transform SQL Date variable into Text

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am building a flow where it takes info from SQL Database and sends an email.

 

1.png

 

And it works great:

 

2.png

 

However, I would like to transform the date into a nice format (Something like 12 Jun 2018 instead of 2018-06-12T00:00:00Z or at least to just 2018-06-12).

 

I am very familiar with PowerApps and there I would just use Text() function to transform date into nice date formats. Is there an equivalent function I can use in Flow?

Categories:
I have the same question (0)
  • Verified answer
    v-yuazh-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    You could take a try with expresssion "formatDateTime()" to transform the  2018-06-12T00:00:00Z to 2018-06-12.

     

    I have made a test on my side and have created a flow as below:

    Capture.PNG

     

    The expression in the email as below:

    formatDateTime(body('Current_time'),'yyyy-MM-dd')

    The flow would run successfully as below:

    Capture.PNG

     

     

    You could refer to link below to learn more about the workflow definition language:

    https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language

     

     

    Best regards,

    Alice

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-yuazh-msft

     

    Thank you Alice, this is exactly what I was looking for.

     

    Is there a list of all available date time format strings?

     

    I have tried 'dd/mmm/yyyy' which works with PowerApps Text() function but does not work with the Flow.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 227

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard