Calculate Time difference in calculated column

Copper Contributor

Hi all,

How do i calculate the time difference between time delivered and time accepted. Both of the columns are single line of text.

My time taken column is a calculated single line of text type. 

AloisOhZH_0-1605767018417.png


Regards,
Alois

5 Replies

@AloisOhZH 

Can you please share the formula you are currently using for "Time Taken"?

That will help us to identify the issue with formula and answer your question more precisely.

 

Also, why are you using single line of text fields for Time Accepted and Time Delivered?

 

General format for your formula should something be like:

=TEXT(DATE([Column2])-DATE([Column1]),"h:mm:ss")

ReferenceDate and time formulas 


Please click Mark as Best Response if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

 

Hi @ganeshsanap ,

Both my time accepted and time delivered are single line of text because in my powerapps, I use Now() function to capture the time and date. Now that I want to calculate the time difference, I referred to the formula you sent. It returns an error.

AloisOhZH_0-1605853915882.png


Regards,
Alois

@AloisOhZH 

You can save Now() from Power Apps to SharePoint date and time fields, check below reference:

Sending Date and Time to SharePoint Column Type Date and Time 

 

Also, what is the error you are getting using above formula? 

 

Note:

  1. Sometimes comma(,) does not work in formula (I am not sure but it is based on something language or regional settings on your site). So in that case use semicolon(;) instead of comma(,).

For correct syntax, check this: Calculate the difference between two times 


Please click Mark as Best Response if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

 

@ganeshsanap as you have the dates & times in Power Apps you could just do the DateDiff calculation in Power Apps then save the result to the SharePoint list item.

 

DateDiff-formula.pngDateDiff-Result.png

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

Hi @ganeshsanap ,

I tried what u seggest but I get an error with both comma (,) and semicolon (;). Do u have any other trick to share?

 

rispazia_1-1619270527090.png

 

 

rispazia_0-1619270491273.png