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 / Working with a time fi...
Power Automate
Answered

Working with a time field that is text (Forms -> SharePoint)

(0) ShareShare
ReportReport
Posted on by

Hi,


Bit of a challenge today, I am trying to find a way to deal with a limitation of Microsoft Forms in that it doesn't have a "Time" control.  At the moment I have two text controls on the form "Start Time" and "End Time", here users input the time they started/finished a job in the format 11:00 (they are using 24H clock so I don't have to worry about AM/PM).  The start/end times are always within the same day so no issues with trying to combine two days.

 

pa-form1.png

 

What I am trying to achieve is to calculate the amount of time between the two time fields using Flow then push this result into a Number column within SharePoint.

 

pa-form2.png

 

Any thoughts gratefully received.

 

Cheers

Rob

Categories:
I have the same question (0)
  • Verified answer
    Mira Ghaly Profile Picture
    11,415 Moderator on at

    @Rob_CTL 

    1. you need to convert the start and end times to an Integer using a an expression details as below

     

     

    I initialized 2 variables you can replace with your variables from the form

    Mira_Ghaly_0-1597748864767.png

    New Int Variable as below :int(split(variables('Start'),':')[0]), repeat the same for End

    Mira_Ghaly_1-1597749086632.png

     

     

    Mira_Ghaly_0-1597749213262.png

     

     

    Then use the the subtract expression as below to get the difference as below:

    sub(variables('EndInt'),variables('StartInt'))

    Mira_Ghaly_1-1597749300871.png

    If this post helps you with your problem, please mark your as Accepted solution.

    If you like my response, please give it a Thumbs Up.

    MG (Naturally Curious)

     

  • Rob_CTL Profile Picture
    on at

    @Mira_Ghaly thanks for the reply, I managed to use SharePoint calculated columns to do the transformation but I like your solution so I'll keep that in my tool box for next time.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 550

#2
Valantis Profile Picture

Valantis 390

#3
11manish Profile Picture

11manish 348

Last 30 days Overall leaderboard