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 Apps / Create Outlook Calenda...
Power Apps
Answered

Create Outlook Calendar event from a PowerApp (w. Sharepoint)

(0) ShareShare
ReportReport
Posted on by 195

Hi All...

I have a Powerapp (demo) collecting booking information. The booking date is stored in Sharepoint along with a field with booking length in Mins (stored as a number). 

 

Sharepoint fields are:

  • Timeslot (stored as Date & Time) eg 12/08/2020 09:00 (12th Aug)
  • SlotLength (number) eg 60 (mins)

I then have this code to create a record in Outlook, but i need to know how I change this so that the date time is store in UK format.

 

Current code:

Office365Outlook.V4CalendarPostItem(

    LookUp(Office365Outlook.CalendarGetTables().value, DisplayName="Calendar").Name,

    ThisItem.Title,

    DateAdd(ThisItem.TimeSlot,TimeZoneOffset(), Minutes),

    DateAdd(ThisItem.TimeSlot, ThisItem.SlotLength + TimeZoneOffset(), Minutes),

    "(UTC) Coordinated Universal Time",

    {

        body: "Meeting created with PowerAppps"

    }

)

Presently, a booking for 12th August is saving a record on the 8th December.

 

Can anyone advise how I need to change this to save in UK timezone in Outlook please? It should create a 60 min meeting on 12th Aug.

 

Many thanks.

Paul

 

 

 

 

 

 

Sharepoint.png
Categories:
I have the same question (0)
  • Verified answer
    PJBruen Profile Picture
    195 on at

    I seem to have resolved this now. Here's my fix if this is useful to others.

     

    Set(varStartDate, Text(ThisItem.TimeSlot, "[$-en-GB] dd/mm/yyyy hh:mm:ss"));
    Set(varEndDate, Text(DateAdd(ThisItem.TimeSlot,ThisItem.SlotLength, Minutes), "[$-en-GB] dd/mm/yyyy hh:mm:ss"));

    Office365Outlook.V4CalendarPostItem(
       LookUp(Office365Outlook.CalendarGetTables().value, DisplayName="Calendar").Name,
       ThisItem.Title,
       Text(DateTimeValue(varStartDate,"en-GB"), DateTimeFormat.LongDateTime),
       Text(DateTimeValue(varEndDate, "en-GB"), DateTimeFormat.LongDateTime),
       "(UTC+00:00) Dublin, Edinburgh, Lisbon, London",
       {
           body: "Meeting created with PowerAppps"
       }
    )

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 Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard