Powershell scripts for Sharepoint 2010
TimeSpan daysLate = DateTime.Today - terminSplnenia;
if (daysLate.Days >= 0) { sum += daysLate.Days; }
days difference | TimeSpan | date difference | date