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 / Dynamically Input Date...
Power Automate
Unanswered

Dynamically Input Date and Time From Excel File in Start and End Time

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all,

I am using List rows present in a table action to extract rows (Date, Start Time and End Time) and dynamically trying to input start and end time in Get calendar view of events (V3) action from excel file table.

 

here is my table from excel file:

time.PNG

so far I have managed to get everything from an excel file. Unfortunately when I am using this to insert query in start and end time, its not letting me and keep giving me an error because time is in string format.

 

here is the flow i am working on:

 

time1.PNG

 

Start Time: 

addHours(startOfDay(convertToUtc(outputs('Schedule_Date'),'Pacific Standard Time')), int(outputs('Start_Time')))
 
End Time: 
addHours(startOfDay(convertToUtc(outputs('Schedule_Date'),'Pacific Standard Time')), int(outputs('End_Time')))
 
Error:
errortime.PNG
 
Can anyone please help me on this problem?
 
Thank you 
 
Regards,
 
Ahmad.
Categories:
  • Krishna92 Profile Picture
    Microsoft Employee on at

    @Anonymous 

     

    The formula addHours() expects three parameters

     

    - Time stamp to which it has to add the value (String)

    - Number of hours to add (Int)

    - Parameter that indicates how to format the value.(String)

     

    You are trying to add incorrect values to the formula, and the error that you are getting is because, you are passing value something like '10:00:00' in the int function, this string cannot be converted to int directly, for this you can use formatdatetime() to format the value to hours by doing, formatdatetime(inputvalue, 'hh') this will extract only hours from the input value passed and you oass this output to int function.

     

    If this information helps you with resolution, please consider giving a thumbs up and mark the solution as resolved.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you    for your response.

     

    Is there any possibility i can use time '10:00:00'? because it will e more flexible in the calendar if it comes with for example '10:30:00'.

     

    if there is any possible expression please help me on this?

     

    Thanks in advance

     

    Regards

    Ahmad

  • MattWeston365 Profile Picture
    1,701 on at

    Hi @Anonymous if you want to include more of the time, then you just need to build out the format. In @Krishna92 's example, it was just using 'hh' which will display the hour. If you want the full time then you should use 'hh:mm:ss'

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi ,  @Krishna92 ,

     

    This is what i have tried to insert in start and end time:

     

    Note: As I have local time in my excel file, and start and end time consider as UTC time format. What I want is to convert into my local time like 10:00:00 or 14:00:00.

    Start time:

    convertFromUtc(formatDateTime(concat(outputs('Schedule_Date'),'T',outputs('Start_Time')),'yyyy-MM-ddThh:mm:ssZ'),outputs('Your_Time_Zone'))
     
    End time:
    convertFromUtc(formatDateTime(concat(outputs('Schedule_Date'),'T',outputs('End_Time')),'yyyy-MM-ddThh:mm:ssZ'),outputs('Your_Time_Zone'))
     
    here is output time after converting, unfortunately output time is not 10:00:00 or 14:00:00 am as my local time:
    timeutc.PNG
     
     
    Can you please tell me where am i doing wrong?
     
    Regards,
     
    Ahmad.
  • MattWeston365 Profile Picture
    1,701 on at

    Hi @Anonymous it might be easier to use the Convert Time Zone action to help create the correct time as it looks like your time is still in UTC. You can feed in the time that you're starting with, e.g. UTC, and then convert it to your desired timezone.

     

    Convert Time Zone.PNG

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you  

     

    I have successfully did it using convertToUtc function.

     

    Thank you

     

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
Mohsin Ali Profile Picture

Mohsin Ali 289

#2
11manish Profile Picture

11manish 288 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 125

Last 30 days Overall leaderboard