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

Notifications

Announcements

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

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
    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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard