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 / Error with Office365Ou...
Power Apps
Suggested Answer

Error with Office365Outook.V4CalendarPostItem

(1) ShareShare
ReportReport
Posted on by 2
I have following Code: 
 
 
Set(
    startDate,
    DateValue(
        Text(DatePicker1_2.SelectedDate, "dd-mm-yyyy") & " " &
        Text(Value(Dropdown1_6.Selected.Value), "00") & ":" &
        Text(Value(Dropdown1_7.Selected.Value), "00")
    )
);
 
Set(
    endDate,
    DateValue(
        Text(DatePicker1_3.SelectedDate, "dd-mm-yy") & " " &
        Text(Value(Dropdown1_8.Selected.Value), "00") & ":" &
        Text(Value(Dropdown1_9.Selected.Value), "00")
    )
);
 
// Patch-Befehl für das Hinzufügen von Daten in die SharePoint-Liste
If(
    IsBlank(cb_PeoplePicker.Selected) || IsBlank(cb_PeoplePicker_1.Selected),
    Notify("Bitte wählen Sie einen Wert für Requester und Contact Person aus.", NotificationType.Error),
    Patch(
        'Besucheranmeldung PowerApps - testing',
        Defaults('Besucheranmeldung PowerApps - testing'),
        {
            Requester: {
                '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
                Claims: "i:0#.f|membership|" & cb_PeoplePicker.Selected.Mail,
                Department: "",
                DisplayName: cb_PeoplePicker.Selected.DisplayName,
                Email: cb_PeoplePicker.Selected.Mail,
                JobTitle: "",
                Picture: ""
            },
            'Grammer Location visited': Dropdown1_3.Selected.Value,
            'Contact Person':{
                '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
                Claims: "i:0#.f|membership|" & cb_PeoplePicker_1.Selected.Mail,
                Department: "",
                DisplayName: cb_PeoplePicker_1.Selected.DisplayName,
                Email: cb_PeoplePicker_1.Selected.Mail,
                JobTitle: "",
                Picture: ""
            },
         'Day of Arrival': DateTimeValue(Text(startDate, "[$-en-US]dd/mm/yyyy HH:mm")),
        'Day of Departure': DateTimeValue(Text(endDate, "[$-en-US]dd/mm/yyyy HH:mm")),
        Creator: varCurrentUser,
        'More then 1 Visitor': Dropdown1_13.Selected.Value,
        VisitorName1: TextInput1_6.Text,
        VisitorName2: TextInput1_9.Text,
        VisitorName3: TextInput1_10.Text,
        VisitorName4: TextInput1_13.Text,
        VisitorName5: TextInput1_16.Text,
        'More then 1 Company': Dropdown1_14.Selected.Value,
        CompanyName1: TextInput1_21.Text,
        CompanyName2: TextInput1_22.Text,
        CompanyName3: TextInput1_23.Text,
        CompanyName4: TextInput1_24.Text,
        CompanyName5: TextInput1_25.Text,
        VisitorEmail1: TextInput1_14.Text,
        VisitorEmail2: TextInput1_26.Text,
        VisitorEmail3: TextInput1_27.Text,
        VisitorEmail4: TextInput1_28.Text,
        VisitorEmail5: TextInput1_29.Text,
        'Reason of visit': TextInputCanvas1.Value,
       'Wifi Access needed': Checkbox2_8.Value,
        'Number of Accesses': Value(NumberInput1_8.Value),
        'Area which is visited': If(
            IsEmpty(ComboboxCanvas2_1.SelectedItems),
            Blank(),
            Concat(ComboboxCanvas2_1.SelectedItems, Value & ", ")
        ),
        'Exact area visited:': If(
            IsEmpty(ComboboxCanvas2.SelectedItems),
            Blank(),
            Concat(ComboboxCanvas2.SelectedItems, Value & ", ")
        )
    }
);
 
// Kalender-Event erstellen
Office365Outlook.V4CalendarPostItem(
    "Calendar", // Kalendername
    "Besucheranmeldung - " & ComboboxCanvas2.Selected.Value & " - " & ComboboxCanvas2_1.Selected.Value, // Betreff mit visitedArea und exactArea
    DateAdd(DateTimeValue(DatePicker1_2.SelectedDate & " " & Dropdown1_6.Selected.Value & ":" & Dropdown1_7.Selected.Value), TimeZoneOffset(), TimeUnit.Minutes), // Startdatum und -zeit
    DateAdd(DateTimeValue(DatePicker1_3.SelectedDate & " " & Dropdown1_8.Selected.Value & ":" & Dropdown1_9.Selected.Value), TimeZoneOffset(), TimeUnit.Minutes), // Enddatum und -zeit
    "(UTC) Coordinated Universal Time", // Zeitzone
    {
        requiredAttendees: "xy@gmail.com",
        location: "Immenstetten", // Festgelegter Standort
   body:"Grund des Besuchs: " & TextInputCanvas1.Value
    }
);
 
 
When I set my browser language to English, everything works fine and the calendar event is created. However, if I change the browser language to German, the creation of the calendar event no longer works. I get the following error message: String was not recognized as a valid DateTime status 400. The date is made up of the two date pickers for start and end date and four dropdowns for start time in hours and minutes. I also send emails with date and time in a separate place, it works in both languages, I think it must really depend on the event for the creation of the calendar event. I would be very grateful for help.
Translated with DeepL.com (free version)
Categories:
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,970 Super User 2026 Season 2 on at
    Hi
     
    My guess, as I cannot see it, is that when you change the Language, you are changing the Date Format, which will need to match that languages Date Format.
     
    That I believe is your issue,
     
    Or you have adding some German into the Date and not meaning to
     
  • mstavra Profile Picture
    247 on at
    As @FLMike said i think your issue lies on the date format. I had similar issues with dots and commas on currency and this can be a pain. 
     
    I would suggest to play a bit with date formats to see if this resolve your issue. Maybe try a YYYY-MM-DD date format which in general is accepted by any language.

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 Apps

#1
11manish Profile Picture

11manish 383 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 356

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard