Hi All,
I am trying to minimise the time it takes me to monitor the amount time spent on certain tasks. I have a CSV file:
Project,StartDate,StartTime,EndDate,EndTime,Duration
Project 1,19122018,16:39:26,19122018,16:39:28,00:01.8
Project 2,19122018,16:39:28,19122018,16:39:29,00:00.3
Project 3,19122018,16:39:29,19122018,16:39:29,00:00.4
Project 4,19122018,16:39:29,19122018,16:39:29,00:00.3
Project 5,19122018,16:39:29,19122018,16:39:30,00:00.3
The projects and dates will change week to week and are not known ahead of time. There may be multiple occurances of each project/date combination.
I am trying to find the total duration of each project for each day.
So far I am able to list each duration for each project/day but as they are strings I am struggling to generate a sum.
$output = (Import-CSV -Path -Delimiter ",") | Group-Object -property StartDate,Project foreach ($name in $output) { write-host $name.name "," $name.Group.Duration }
Ideally I would like
StartDate,Project,Sum of Duration
Thanks in advance for any assistance.