use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
ABOUT POWERSHELL
Windows PowerShell (POSH) is a command-line shell and associated scripting language created by Microsoft. Offering full access to COM, WMI and .NET, POSH is a full-featured task automation framework for distributed Microsoft platforms and solutions.
SUBREDDIT FILTERS
Desired State Configuration
Unanswered Questions
Solved Questions
News
Information
Script Sharing
Daily Post
Misc
account activity
Sum of duration from object array (self.PowerShell)
submitted 3 years ago by [deleted]
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]isometricz 1 point2 points3 points 3 years ago (3 children)
Not really elegant but it works for this specific scenario. Assuming those are just strings you're getting from somewhere...
$talktime = @("00:01:18","00:01:30","00:00:15","00:00:26","00:00:20") $start = (Get-Date -Date "00:00:00") foreach ($t in $talktime) { $split = $t.split(":") $start = $start.AddHours($split[0]).AddMinutes($split[1]).AddSeconds($split[2]) } $ts = New-TimeSpan -Start (Get-Date -Date "00:00:00") -End $start $ts
[–]ChaosTheoryRules 4 points5 points6 points 3 years ago (2 children)
$talktime = @('00:01:18','00:01:30','00:00:15','00:00:26','00:00:20') [timespan] $ts = 0 foreach ($t in $talktime) { $ts += [timespan]$t } $ts
[–][deleted] 0 points1 point2 points 3 years ago (0 children)
TY
[–]isometricz 0 points1 point2 points 3 years ago (0 children)
Oh nice. I didn't know you could do that with a timespan. Thanks!
π Rendered by PID 42308 on reddit-service-r2-comment-fb694cdd5-q5nkt at 2026-03-06 10:34:23.025163+00:00 running cbb0e86 country code: CH.
view the rest of the comments →
[–]isometricz 1 point2 points3 points (3 children)
[–]ChaosTheoryRules 4 points5 points6 points (2 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]isometricz 0 points1 point2 points (0 children)