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 / Format date and dateti...
Power Automate
Answered

Format date and datetime columns from SQL to Excel

(0) ShareShare
ReportReport
Posted on by 194

Hi All,

I have a flow that looks like this:

Nicci_0-1714658987031.png

 

The Date and DateTime Scanned are columns in SQL that are date and datetime. When the flow creates the csv file the date and date time looks like this:

 

Date
2024-05-02T00:00:00Z
DateTime Scanned
2024-05-02T10:04:38.473Z

 

How do I get these 2 to look 'normal' so for Date I want it to be: 2/5/2024 and for datetime I want it to be 5/2/2024 HH:mm:etc I think the Z means its UTC? Is there a way to convert to EST?

 

Not sure how to convert the format and what step it belongs in or is it a separate step needed in my flow. Thanks!

Categories:
  • Verified answer
    v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @Nicci 

    First , you can use this expression to convert the DateTime:
    (1) Date : 2024-05-02T00:00:00Z  ------ > 02-05-2024:

    vyueyunmsft_0-1714700385484.png

    formatDateTime( outputs('Compose'),'dd-MM-yyy') 
     
    (2)DateTime Scanned  :  
    2024-05-02T10:04:38.473Z   -------- >   05/02/2024 06:04:etc
    vyueyunmsft_1-1714700684948.png
    concat(convertTimeZone(outputs('Compose'),'UTC','Eastern Standard Time','MM/dd/yyyy HH:mm'),':etc') 
     
    And for the TimeZone you can refer to this :
    Default Time Zones | Microsoft Learn
     
    [Note]: In your side , you can use the expression in your Select action.
    You can use your mouse hover on the field value for your  Date and DateTime Scanned fields to see the raw expression, and then replace the outputs('Compose') to your expression in your side.
     
     vyueyunmsft_2-1714701028713.png

     

    formatDateTime( item()?['ScannedDate'],'dd-MM-yyy'
    concat(convertTimeZone(item()?['CreatedOn'],'UTC','Eastern Standard Time','MM/dd/yyyy HH:mm'),':etc') 
     
     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

     

  • Nicci Profile Picture
    194 on at

    this is perfect, thank you!

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 273 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 235

#3
David_MA Profile Picture

David_MA 172 Super User 2026 Season 2

Last 30 days Overall leaderboard