Forum Discussion
Calculate Time difference in calculated column
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.
Regards,
Alois
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")
Reference: Date 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.
- AloisOhZHCopper Contributor
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.
Regards,
AloisYou 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:
- 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.
- RobElliottSilver Contributor
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.
Rob
Los Gallardos
Microsoft Power Automate Community Super User