hi friends plz tell me how to add time which is in HH:MM:SS (in 24 hr format). i have a array of time stored. need to add those times and calculate total time...
taurusone 0 Newbie Poster
Recommended Answers
Jump to PostYour question is ambiguous. Please provide an example with input and the desired result.
Jump to Post...pretty-much the same thing:
using System; using System.Collections.Generic; namespace DW_412697_CS_CON { class Program { static void Main(string[] args) { TimeSpan ts = new TimeSpan(); new List<string>{"01:11:00", "00:10:00", "01:56:00"} .ForEach(s => ts += TimeSpan.Parse(s)); Console.WriteLine(ts.ToString()); } } }
All 5 Replies
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
taurusone 0 Newbie Poster
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
taurusone 0 Newbie Poster
thines01 401 Postaholic Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.