Skip to main content

Notifications

Power Automate - Using Connectors
Answered

Microsoft Flow Approval Date & Time Issue

Posted on by 13

Hi All,

 

I would like to making a approval flow for my company that can be approved by using SharePoint. the progress of the flow look like this.

 

flow process.png

 

Everything seems fine but when I trying to run a flow I seems to found a problem that the Date & Time are not showing correctly as my timezone is GMT+7 but when the flow run, It show time UTC+0 instead.

 

1. Here is the site when I'm filled with details to getting the flow run when the item is created on the site

 

site test.png

2. Here is the Date & Time issue that showing the UTC+0 instead

 

utc time problem.png

 

Is there anyway to getting when the approve process is proceed, the date & time will be shown correctly as the site ?

 

Thank you in advance !

Regard,

Peter

  • ahernandez Profile Picture
    ahernandez 14 on at
    Re: Microsoft Flow Approval Date & Time Issue

    Hello,

                    I too am encountering this issue with SPO online 2016.  I cannot find the out of office dynamic content nor do I know what content to enter for Central Standard time (Chicago).  I am somewhat new to SPO and I will appreciate your help sir.  Thanks


    @v-zhos-msft wrote:

    Hi @PeterR ,

    You can set the date format in the Compose with the expression below:

    Best Regards,

    Community Support Team _ Zhongys

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.


     

  • PeterR Profile Picture
    PeterR 13 on at
    Re: Microsoft Flow Approval Date & Time Issue

    Hello @v-zhos-msft 

     

    Thank you for your help, all is working now !

     

    Regard,

    Peter

  • v-zhos-msft Profile Picture
    v-zhos-msft on at
    Re: Microsoft Flow Approval Date & Time Issue

    Hi @PeterR ,

    You can set the date format in the Compose with the expression below:

    Best Regards,

    Community Support Team _ Zhongys

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • PeterR Profile Picture
    PeterR 13 on at
    Re: Microsoft Flow Approval Date & Time Issue

    Hello @v-zhos-msft 

     

    so the flow is working now, thank you for your help !

     

    I'm wonder if the date & time that shown on the approve on email is possible to change or separate them to make it easier to look ?

     

    time format.png

     

  • v-zhos-msft Profile Picture
    v-zhos-msft on at
    Re: Microsoft Flow Approval Date & Time Issue

    Hi @PeterR ,

    Please make sure you have used the output of the Compose into the Approval.

    Please take a reference of my first reply.

    Best Regards,

    Community Support Team _ Zhongys

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • PeterR Profile Picture
    PeterR 13 on at
    Re: Microsoft Flow Approval Date & Time Issue

    Hello @v-zhos-msft,

     

    I have tried to add per your advice and the flow is working but time still doesn't convert to the gmt timezone.

    I also look into the time zone ids and add it in the flow accordingly. Is there anything I missing ?

     

    this is the expression I used.

     

    convertFromUtc(triggerBody()?['Out_x0020_of_x0020_Office'],'SE Asia Standard Time')
    convertFromUtc(triggerBody()?['Back_x0020_to_x0020_Office'],'SE Asia Standard Time')
     
    here is the flow run process.
     
    flow.png
    and here is the result I got.
     
    time not change.png
     
    Regard,
    Peter

     

     

     

  • v-zhos-msft Profile Picture
    v-zhos-msft on at
    Re: Microsoft Flow Approval Date & Time Issue

    Hi @PeterR ,

    As the error message said, the flow hasn't get the value of time.

    Please make sure you have use the correct expression.

    You can't just copy the expression of mine.

    When you set the expression, you can click the dynamic content to add code into the expression.

    Capture1.PNG

    Best Regards,

    Community Support Team _ Zhongys

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • PeterR Profile Picture
    PeterR 13 on at
    Re: Microsoft Flow Approval Date & Time Issue

    Hi @v-zhos-msft 

     

    My apologies for the delayed response as yesterday I'm out of the office.

     

    Thank you for your solution, However I have tried the solution per your suggestion but still got an error.

     

    1.png

    I'm not sure what it cause this, I will take a look on your reference to see if I can find some workaround on this.

  • Verified answer
    v-zhos-msft Profile Picture
    v-zhos-msft on at
    Re: Microsoft Flow Approval Date & Time Issue

    Hi @PeterR , 

    You can use the convertFromUtc function here.

    Please take a reference:

    https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#convertFromUtc

    https://docs.microsoft.com/en-us/previous-versions/windows/embedded/gg154758(v=winembedded.80)

    I have made a flow for your scenario, please check it for a reference.

    The expression in the Compose and Compose 2 are:

    convertFromUtc(triggerBody()?['Outofoffice'],'SE Asia Standard Time')
    convertFromUtc(triggerBody()?['Backtooffice'],'SE Asia Standard Time')
    Capture10.PNG

    Best Regards,

    Community Support Team _ Zhongys

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
     

     

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

October 2024 Newsletter…

October 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #4 How to Conntact Support…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 142,651

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,727

Leaderboard

Featured topics