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 / Split date and time fo...
Power Automate
Unanswered

Split date and time format

(1) ShareShare
ReportReport
Posted on by 1,106

Hi,

 

Is it posibble to split this Date and Time data to only a date fortmat?

 

Firts i have this expression but that is for  this format:  10-03-2021 02:24:39

split(first(split(items('Apply_to_each')['Time'],' ')), '-')

 

Now in a new flow i must split now : (11-3-2021 08:53:28)

 

How do i do that so i have only the date?

 

Categories:
  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    Wouldn't it be easier just to use formatDateTime() like this

     

    formatDateTime(first(items('Apply_to_each'))['Time'],'dd/MM/yyyy')

     

  • oaghaei Profile Picture
    173 on at

    Hello @Pstork1 I saw your response to the above, and I had a similar challenge and used your solution, it worked! However, once I reformat the date, I can't seem to plug it into the html table. I am getting this error: "Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The inputs of template action 'Select' at line '1 and column '1309' is invalid. Action 'Apply_to_each' must be a parent 'foreach' scope of action 'Select' to be referenced by 'repeatItems' or 'items' functions.'.'." Below is my flow. I think if I was to move the select html table into apply for each, I will get duplicate emails later. Any thoughts? 🙂 

    oaghaei_0-1633452869796.png

    oaghaei_1-1633453038425.png

     

     



     

  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    Please post this as a new question.  You'll get a better response and people will be able to find the answer more easily in the future.  After you post it as a new post send me a link and I'll take a look.

  • oaghaei Profile Picture
    173 on at

    @Pstork1 The solution was to refer to the field using item()?. This worked:

     

    formatDateTime(item()?['Deadline'],'MM/dd/yyyy')

     

    Thank you though! Next time I will make sure to post as a separate post.

  • nmlsanmiguel Profile Picture
    on at

    is it possible to get the month value only from a selected datetime column? Thank you.

  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    Please post this as a new question.  You'll get a better response and people will be able to find the answer more easily in the future.  After you post it as a new post send me a link and I'll take a look.

  • MWibisono Profile Picture
    75 on at

    How can I use formatdatetime to 'yyyy-MM-ddTHH:mm:ssZ' when I use a split function to extract date and time (hour and minute), for example like 5-12-2023 (dd-MM-yy) 16:45, and apply those into delay until?

  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    Please post this as a new question.  You'll get more responses and others will be able to find the answer more easily later.

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 289

#3
Henil Profile Picture

Henil 125

Last 30 days Overall leaderboard