Mouhssine tahri

Mouhssine tahri

  • NA
  • 201
  • 11.1k

How to calculate Sum datatime? under format HH:MM:SS using Linq Lamba

Sep 30 2021 10:10 AM

i have column Duree_Comm in my class 

 public partial class Staxe
    {
        public System.DateTime Date_Comm { get; set; }
        public System.DateTime Heure_Comm { get; set; }
        public string N_Poste { get; set; }
        public Nullable<System.DateTime> Duree_Comm { get; set; }
    }
}
 example values Duree_Comm  in my  class , i want calculate sum Duree_Comm  using Linq lambda  and the result be under format hh:mm:ss thanks

1899-12-30 00:00:22.000
1899-12-30 00:00:36.000
1899-12-30 00:00:05.000
1899-12-30 00:00:59.000
1899-12-30 00:01:04.000
1899-12-30 00:00:09.000
1899-12-30 00:01:23.000
1899-12-30 00:01:24.000
1899-12-30 00:02:42.000

Answers (2)