Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Build Time Stamp Start and End then Record



Good day.


Can you help me to create a time stamp and record the Activity worked once the END TIME is clicked.


And, all results will be transferred to an excel made on OneDrive Business.






Community Support
Community Support

Hi @Edgecko17 ,

What is your Start time? Is this time field that already set in your Excel?

Do you want to insert the current time as the time stamp and submit this activity when user click End time button?  If so, you can follow below steps(Just a simple example). If I misunderstand, please correct me.

1. Create a Excel file(used as datasource in my app) inside my OneDrive for Business with three field:


2. Create a app with which data source is the above Excel. Also add an edit form for test.

3. Add a button and rename it as "EndTime". Set the OnSelect property of "EndTime" as below(replace your own data with the underlined positions. Here, DataCardValue1 is the name of my Activity Name field as below picture).


For creating a new activity, use this formula(this will set current time to EndTime field, you can also select a date manually for this field):


Patch(datasource,Defaults(datasource),{'Activity Name':DataCardValue1.Text,EndTime:Now()})


For edit an existing activity inside the Excel, use this formula(you should enter the right existing activity name inside the text input control):


Patch(datasource,LookUp(datasource,'Activity Name'=DataCardValue1.Text),{EndTime:Now()})


Best Regards,


Hi @v-albai-msft ,


Good day.


Thanks on this. This is the exact visual I'm looking for but ff-up questions:


1. Can I use drop-down lists on the Activity Names? Those lists are located on other file perhaps?

2. The "datasource" is the name I will put on the formula not the name of excel file?

3. What does the patch means?



Hi @Edgecko17 ,

1. Do you want to replace Textbox by Drop down? If yes, you can refer to below article: 

2. You can find your datasource in this place. So I should use "Activity" as my datasource in the formula, this is the Table name inside my Excel file.


3. Patch () can modify or create one or more records in a data source, or merges records outside of a data source. In your case, Patch() will create/edit the activity and also set EndTime field as Now().

For more information about Patch(), you can refer to this article:

Patch function - Power Apps | Microsoft Docs 

Best regards,


Hi @Edgecko17 ,

How are things going? Have you solved your issue?

If my solution is helpful to you, please mark my answer. This will benefit other community members who stuck with the same question.

Best regards,


Helpful resources

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (5,609)