Skip to main content

Notifications

Power Automate - Building Flows
Answered

creating calendar event from forms - goes one day shorter then date input

(0) ShareShare
ReportReport
Posted on by 5

Hi there, 

I am trying to automate the reservation process for a piece of equipment. The goal is to have the user complete a form, then take the data from the form to create an outlook calendar event.

 

the form has a separate question for the check-out date and the check-in date. I use the dynamic content to populate the data for event start/end time. I would like for these to be all day events as well.

 

I have two issues

  1. When the check-out and check-in are on the same date the flow fails with the message reading - "Your request can't be completed. Your request can't be completed. The duration of an event marked as All day must be at least 24 hours."
  2. When the check-out and check-in date goes over multiple days the event created is always one day short.
    1. For example: Check-out on 06/19/23 and check-in on 06/22/23. The event populates with the dates of 6/19-6/21. I want the event to reflect that the equipment is still reserved on this 22nd date.

It seems the issue for both of these, is that flow does not view that check-in date as a full day. Its almost using it as a stopping point for the event, once the clock hits midnight on that date the event is over

 

Any suggestions

  • TZ-20011511-0 Profile Picture
    TZ-20011511-0 2 on at
    creating calendar event from forms - goes one day shorter then date input
    Its hard to see in the screenshot but you have to add ,1 at the end of the script.  Once I figured out I was missing the comma, it worked great.  Thank you
  • kylo1 Profile Picture
    kylo1 5 on at
    Re: creating calendar event from forms - goes one day shorter then date input

    This was the solution! addDays was exactly what i needed.

     

    Thanks!

  • Verified answer
    Re: creating calendar event from forms - goes one day shorter then date input

    Hi @kylo1,

    Do you want to create an event according to the response submitted in the form?

     

    Please offer me more information.

    1. Are the check-in and check-out in the form Date type?

     

    I did some test according to your requirements.

     

    You can Set the End time in Create event as the day after check-out.

     

    vmingkzmsft_0-1687240428480.png

    Following is my form.

    vmingkzmsft_1-1687241052084.png

     

    Best Regards,

    Kyrie Zhang

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,445

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,741

Leaderboard