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 / Convert Datetime using...
Power Automate
Answered

Convert Datetime using "convert time zone" action

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all,

 

I am able to convert the time from 10/08/2019 to

 2019-10-07T11:00:00.0000000Z

I want my final output to be

2019-10-07T11:00:00.0000

So basically removing the last 4 characters.

 

How would I do that?

 

Thank you 

Categories:
  • RezaDorrani Profile Picture
    12,145 on at

    Hi @Anonymous 

     

    Use expressions

     

    replace(dynamiccontentdatevalue,'000Z','')
     
    or
     
    substring(dynamiccontentdatevalue,0,sub(length(dynamiccontentdatevalue),4))
     
    --------------------------------------------------------------------------------
    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Rich,

     

    Where do I add that? Sorry I am new to Flow...Flowchart.PNG

    Do I need a new action between "Convert time zone" and "Filter Array 3"?

     

    Best

     

  • RezaDorrani Profile Picture
    12,145 on at

    @Anonymous 

     

    Depends on where you want it

     

    In apply to each (last action) if you need it in that loop

     

    then use

     

    replace(item()?['internal name of field'],'000Z','')

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I want to use the shorted datetime here:

    Capture.PNG

  • RezaDorrani Profile Picture
    12,145 on at

    @Anonymous 

     

    Then add the expression there

     

    click on the box - go to expression panel and enter it there

     

    replace(dynamiccontentreference,'000Z','')

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    It says expression is invalid. 

    I am sorry about this...I am not too familiar with Flow...

  • RezaDorrani Profile Picture
    12,145 on at

    @Anonymous 

     

    Share screenshot of expression

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    error.PNG

  • Verified answer
    RezaDorrani Profile Picture
    12,145 on at

    Hi @Anonymous 

     

    dynamiccontentreference - that is a dummy text I added for you to replace it with the field which stores the actual value 

     

    so remove this from the expression and then swicth to dynamic content (WHILE IN EXPRESSION WINDOW - dynamic content is right to the left of it as a tab) and select the field which has the date value you want the last 4 chars to be replaced

     

    --------------------------------------------------------------------------------
    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

     

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 267

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard