cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Change Date and Time using the Patch Funtion

Hi Everyone

 

I'm trying to use the Patch function to change an existing Sharepoint row. Everything is working fine exept for the date and time.

 

I don't know how I can change a date picker in PowerApps to also let me pick Time.
How is it possible to write into the following sharepoing column (Scrrenshots are attached):

 

I thank you for the help in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Change Date and Time using the Patch Funtion

Hi @TechFreak ,

Do you want to update a datetime field with date and time value in PowerApps?

I suggest you use a datepicker to choose date, a drop down to choose hour, another drop down to choose minute.

I've made a similar test for your reference:

1)insert a datepicker, two drop downs, a label with Text ":"

put them like this:

2277.PNG

 Set the drop down1's Items:

[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]
//choose hour

set the drop down2's Items:

[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,.....,60]
//choose minute, please fill in completed number, I just list parts of number

2) the patch function:

Patch(Farzeugvergabe_Test, ThisItem,

{
Gefahrene_Route: InputRoute.Text,
Getankt: InputGetankt.Selected,
Bemerkung: BemerkungInput.Text
datefield:DatePicker1.SelectedDate+Time(Dropdown1.Selected.Value,Dropdown2.Selected.Value,0)
}
)
//please replace with your datefield name

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Highlighted
Community Champion
Community Champion

Re: Change Date and Time using the Patch Funtion

Please show your formula
Highlighted
Regular Visitor

Re: Change Date and Time using the Patch Funtion

Patch(Farzeugvergabe_Test, ThisItem,

{
Gefahrene_Route: InputRoute.Text,
Getankt: InputGetankt.Selected,
Bemerkung: BemerkungInput.Text
}
);

 

I do not have a Code for the Date and Time yet. I'm trying to figure out how to do it.

Highlighted
Community Champion
Community Champion

Re: Change Date and Time using the Patch Funtion

Patch(Farzeugvergabe_Test, ThisItem,
{
Gefahrene_Route: InputRoute.Text,
Getankt: InputGetankt.Selected,
Bemerkung: BemerkungInput.Text,
YourDateColumn:YourDatePieckerName.SelectedDate
}
);

Highlighted
Community Support
Community Support

Re: Change Date and Time using the Patch Funtion

Hi @TechFreak ,

Do you want to update a datetime field with date and time value in PowerApps?

I suggest you use a datepicker to choose date, a drop down to choose hour, another drop down to choose minute.

I've made a similar test for your reference:

1)insert a datepicker, two drop downs, a label with Text ":"

put them like this:

2277.PNG

 Set the drop down1's Items:

[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]
//choose hour

set the drop down2's Items:

[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,.....,60]
//choose minute, please fill in completed number, I just list parts of number

2) the patch function:

Patch(Farzeugvergabe_Test, ThisItem,

{
Gefahrene_Route: InputRoute.Text,
Getankt: InputGetankt.Selected,
Bemerkung: BemerkungInput.Text
datefield:DatePicker1.SelectedDate+Time(Dropdown1.Selected.Value,Dropdown2.Selected.Value,0)
}
)
//please replace with your datefield name

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,893)