Hi all,
my time format is '%Y-%m-%d %H:%M:%S'
start_time = 2014-12-04 08:10:32
end_time = 2014-12-04 12:34:45
Here i want output like diff_time = 4.24
Thanks in advance...
Hi all,
my time format is '%Y-%m-%d %H:%M:%S'
start_time = 2014-12-04 08:10:32
end_time = 2014-12-04 12:34:45
Here i want output like diff_time = 4.24
Thanks in advance...
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Vignesh ManiRank #98 · 22.1K reputationPosted Jul 5, 2015, 8:59 PM EDT
DateTime startTime = varValue DateTime endTime = varTime TimeSpan span = endTime.Subtract ( startTime ); Console.WriteLine( "Time Difference (seconds): " + span.Seconds ); Console.WriteLine( "Time Difference (minutes): " + span.Minutes ); Console.WriteLine( "Time Difference (hours): " + span.Hours ); Console.WriteLine( "Time Difference (days): " + span.Days );Vignesh ManiRank #98 · 22.1K reputationPosted Jul 5, 2015, 9:03 PM EDT
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Jul 5, 2015, 9:08 PM EDT
Rajeev PunhaniRank #551 · 4.4K reputationPosted Jul 5, 2015, 9:12 PM EDT
"+ res);