Jul 03 2020 12:55 AM
Jul 06 2020 08:19 AM
@Shah1827 Not sure what you are trying to calculate, but here are some references for sharepoint calculated columns:
But yes, your column must be of type "Calculated" if you want a value derived from a formula. It can't be Single Line of Text.
Jul 07 2020 04:20 AM
Thanks for your reply as I am trying to generate report of daily task , so I am trying to calculate how many hours Employee has done work. like start date and timing to end date and timing.
Jul 07 2020 06:45 AM - edited Jul 07 2020 06:47 AM
I found some old notes where I did something like that - calculating the difference between two date fields, down to the minutes. The users wanted to know how much time passed between task creation and the time it was marked as Started. Also how much time passed between the time it was marked Started and the time it was marked Completed. If you don't need minutes, just delete that part from the formula.
Created to Started =CONCATENATE(INT([Start date]-Created)," Days ",TEXT([Start date]-Created,"h"" hrs ""m"" mins """)) Started to Completed =CONCATENATE(INT([Completed Date]-[Start Date])," Days ",TEXT([Completed Date]-[Start Date],"h"" hrs ""m"" mins """)) Created to Completed =CONCATENATE(INT([Completed Date]-Created)," Days ",TEXT([Completed Date]-Created,"h"" hrs ""m"" mins """))
These formulas were put into Calculated columns. Output must be text. The fields they are referencing are all DATE fields. The "Created" field is the system field that SharePoint creates automatically, but the others were all custom date fields. The results were:
I also found this old note about date differences, but I'm not sure what it will do. Looks like it will just return the number of days between two dates.
Formula: =DATEDIF([Start Date],[Due Date],"D") Settings: select Number for the data type returned from the formula, select 0 for the number of decimal places, and click OK