web
You’re offline. This is a read only version of the page.
close
Skip to main content
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 969

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:
I have the same question (0)
  • Pstork1 Profile Picture
    68,678 Most Valuable Professional on at
    Re: Split date and time format

    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
    Re: Split date and time format

    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
    68,678 Most Valuable Professional on at
    Re: Split date and time format

    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
    Re: Split date and time format

    @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
    Re: Split date and time format

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

  • Pstork1 Profile Picture
    68,678 Most Valuable Professional on at
    Re: Split date and time format

    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
    Re: Split date and time format

    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
    68,678 Most Valuable Professional on at
    Re: Split date and time format

    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

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

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard