Powershell Tip #126: Convert days, hours, minutes, seconds with New-TimeSpan

By | October 29, 2016

Tip: You can use the cmdlet New-TimeSpan to convert days, hours, minutes, seconds.

Convert days : New-TimeSpan -Days 1

new-timespan-days-powershell

Convert hours : New-TimeSpan -Hours 24

new-timespan-hours-powershell

Convert minutes : New-TimeSpan -Minutes 1440

new-timespan-minutes-powershell

Convert seconds : New-TimeSpan -Seconds 86400

new-timespan-seconds-powershell


previous-buttonnext-button

2 thoughts on “Powershell Tip #126: Convert days, hours, minutes, seconds with New-TimeSpan

  1. Pingback: Powershell Tip #125: Identify the duplicates headers of a CSV file | Powershell Guru

  2. Pingback: Powershell Tip #127: Wait for EMC Avamar Backup to be completed | Powershell Guru

Leave a Reply

Your email address will not be published. Required fields are marked *