cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Convert Datetime using "convert time zone" action

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 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

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.

 

View solution in original post

9 REPLIES 9
Highlighted
Dual Super User II
Dual Super User II

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.
Highlighted
Anonymous
Not applicable

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

 

Highlighted

@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','')

Highlighted
Anonymous
Not applicable

I want to use the shorted datetime here:

Capture.PNG

Highlighted

@Anonymous 

 

Then add the expression there

 

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

 

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

Highlighted
Anonymous
Not applicable

It says expression is invalid. 

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

Highlighted

@Anonymous 

 

Share screenshot of expression

 

Highlighted
Anonymous
Not applicable

error.PNG

Highlighted

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.

 

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Kudoed Authors
Users online (2,586)