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

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard