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 / Converting Date from R...
Power Automate
Unanswered

Converting Date from Run Query against Dataset from ISO 8601 to 'DD/MM/YYYY'

(0) ShareShare
ReportReport
Posted on by 8

I have a flow that runs a query against a database and puts it into a CSV table

The date in the query returns in the ISO 8601 format (e.g. 2023-10-11T00:00:00), but I need it to have dd/mm/yyyy

the select portion is just to rename column headers as i need the space between words, and no square brackets. 
I used this expression item()?[Column Header]. Tried to wrap a format time around this but it didnt work

 

ADDLarter_1-1695101535326.png

 

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

    Hi @ADDLarter ,

     

    Please try this 

    formatDateTime(item()?['Column Header'],'dd/MM/yyyy')
     
    Best Regards,
    Wearsky
  • ADDLarter Profile Picture
    8 on at

    Unfortunately it doesn't work, I get this:

     'The template language function 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#formatdatetime for usage details.'.

  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @ADDLarter ,

     

    Try this:

    if(equals(item()?['Column Header'],null),'',formatDateTime(item()?['Column Header'],'dd/MM/yyyy'))
     
    Best Regards,
    Wearsky
  • ADDLarter Profile Picture
    8 on at

    This returned Blank
    a bit more context
    My output looks like this:

    ADDLarter_0-1695166333914.png

    my dax query i run is:

    DEFINE
     VAR __DS0FilterTable =
     FILTER (
     ALL('Combined CACSTOREADVICE'),
     'Combined CACSTOREADVICE'[Start Date] >= TODAY() &&
     'Combined CACSTOREADVICE'[Start Date] < TODAY() + 7
     )
     
     VAR __ColumnsToSelect =
     SELECTCOLUMNS (
    SUMMARIZE( 
     __DS0FilterTable,
     'Combined CACSTOREADVICE'[Start Date]
     ),
     "Start Date", 'Combined CACSTOREADVICE'[Start Date]
     )
    
     VAR __FilteredColumns =
    FILTER (
     __ColumnsToSelect,
    NOT ( ISBLANK ([Start Date] ) )
     )
    
    EVALUATE
     __FilteredColumns

     

    After this I have to rename the columns:
    using the item()?['Combined CACSTOREADVICE[Start Date]']

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 873

#2
Valantis Profile Picture

Valantis 813

#3
Haque Profile Picture

Haque 526

Last 30 days Overall leaderboard