Showing results for 
Search instead for 
Did you mean: 

Update Text field with current time

i am trying to update a text field with the current time and date when a checkbox is checked.  I have tried to use onselect of button to do that but the formula i am using is not working properly. Then i want to update the record in my SQL database that the information is coming from. How would i make this possible?

Community Support
Community Support

Hi @RCSmart01,


Could you please share more details about how you would like to update the record in your SQL Database?

I will share an example here, about how to show the current time in a Label control when CheckBox checked.

1. Add a Label control, add a CheckBox control,

2. Under text property of the Label control, enter the following:


In this way, when the CheckBox is checked, the Label would show the current date and time.

If you would like to update the record in SQL Database with the current time, then you cuold take use of the patch function:

For example:

Patch(TableName, RecordNeedtoModify, {UpdatedRecordItem})

For the details usage of the patch() function, please check:

Patch function in PowerApps




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

Thanks for the reply, i want to apologize for i gave you wrong info, the field i want to update is a date/time field. Thanks for the patch function i am going to read on that and see if it is what i want.

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,117)