cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GigaenvyTAG69
Helper I
Helper I

How can I auto calculate Meeting End Time based on Duration Drop Down in Form?

Hi,

 

I have a Form with the following data cards.

 

  • Start Time_DataCard1 with both an HourValue and MinuteValue drop down datavalue.
  • Duration_DataCard1 with drop down choices of 30, 60, 90, 120, 240
  • End Time_DataCard1 is used only for view purposes. No selection here.

 

What I want to do is to be able to select the HourValue and MinuteValue for the Start Time and then select the required Duration, and automatically have the EndTimevalue update with the calculated end time.

 

For example, if I select Start Time (11:00) from the dropdown of HourValue and MinuteValue with a Duration selection of 30, the End Time automatically calculates to be 11:30. If the Start Time is 11:00 and the Duration is 240, then EndTimeValue is 15:00.

 

Can anyone help with the formula?

 

Thanks,

TAG

1 ACCEPTED SOLUTION

Accepted Solutions

@GigaenvyTAG69 ,

Then you do not have time values - you simply have text of some numbers. I free-typed this, so watch commas and brackets, but the structure would be

Text(
   DateAdd(
      Today() + 
      Time(
         Value(DDHourName.Selected.Value), 
         Value(DDMinuteName.Selected.Value),
         0
      ),
      Value(DDDurationName.Selected.Value),
      Minutes
   ),
   "hh:mm"
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

6 REPLIES 6
WarrenBelz
Super User
Super User

Hi @GigaenvyTAG69 ,

Something like this

Text(
   DateAdd(
      StartTime,
      Duration,
      Minutes
   ),
   "hh:mm"
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @WarrenBelz,

 

I tried different variations of your formula and still it is erroring even when changing to my scenario of card values.

 

Here is a picture of what I want to accomplish. Is it a DateDiff problem instead?

endtime2.pngendtime1.png

@GigaenvyTAG69 ,

Are those drop-downs part of a Date Picker (with a Default date in them) or stand-alone controls?

@WarrenBelz They are stand-alone drop downs with text values covering a 24-hour clock.

 

** Date picker is not shown

 

Upon Submit, the Start Time and End Time get added to a SPO List Single Text columns.

@GigaenvyTAG69 ,

Then you do not have time values - you simply have text of some numbers. I free-typed this, so watch commas and brackets, but the structure would be

Text(
   DateAdd(
      Today() + 
      Time(
         Value(DDHourName.Selected.Value), 
         Value(DDMinuteName.Selected.Value),
         0
      ),
      Value(DDDurationName.Selected.Value),
      Minutes
   ),
   "hh:mm"
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Worked like a charm! Thanks @WarrenBelz 

 

Now it's time to put this all together in a Submit and have the record updated in my SPO List. 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,384)