Goal
Change the VacationStartDateTime column (Date & Time Type) from blank to 12/25/2020 9:30AM.
Input
Vacation Requests (SharePoint List)
ID | EmployeeName | VacationStartDateTime | Hours |
1 | Matthew Devaney | 8 |
Patch Function Code
Patch(
'Vacation Requests',
LookUp('Vacation Requests', ID=1),
{
VacationStartDateTime: Date(2020,12,25) + Time(9,30,0)
}
)
Output
Vacation Requests (SharePoint List)
ID | EmployeeName | VacationStartDateTime | Hours |
1 | Matthew Devaney | 12/25/2020 9:30AM | 8 |
Scenario #1: Date & Time Picker
Patch a value found in a date & time picker to a Date & Time field.
Patch Function Code
Patch(
'Vacation Requests',
LookUp('Vacation Requests', ID=1),
{
VacationStartDateTime:
DatePicker_VacationDate.SelectedDate
+ Time(
Value(Dropdown_Hours.Selected.Value),
Value(Dropdown_Minutes.Selected.Value),
0
)
}
)
Did You Enjoy This Article? 😺
Subscribe to get new Power Apps articles sent to your inbox each week for FREE