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

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,286)