0

I try to make a difference between two dates, but displaying the days and hours. So I found a good idea on this website : https://sharepointonline.wordpress.com/2012/03/02/date-time-duration-using-calculated-field-column/

I have adapted my code with my start time column Debut Diag and my end time column Fin Diag :

=DATEDIF([Debut Diag],[Fin Diag]-(MOD([Debut Diag],1)>MOD([Fin Diag],1)),"d")&" Day(s) "&TEXT(MOD([Fin Diag]-[Debut Diag],1),"hh"" Hour(s) ""mm"" Min(s)""")

Tried with h instead of hh too

But I get an error SharePoint, that explains nothing or gives no idea of the problem. Maybe I have a syntax error, or the way can't work. Can you tell me what do you think?

3

Regarding the error you are receiving, if you are using different regional settings than English in your site, try to replace all the commas (,) to semicolons (;).

You could make a easier calculation to. This one returns the number of days, hours and minutes between the 2 dates.

=TEXT([Fin Diag]-[Debut Diag];"d:h:mm")

Update

Tried out your calculation in my environment, but i replaced the commas and it worked perfectly.

enter image description here

  • yeah thx guy it was that! Just replaced the commas by semi-column and worked!! Thanks! – Jey10 Apr 29 '16 at 11:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.