OT: convert Convergence Time

This topic contains 1 reply, has 2 voices, and was last updated by  Curtis Smith 6 months, 3 weeks ago.

  • Author
  • #78593

    Jeff Taylor

    Sorry about the off topic but can anyone advise how I could convert (with powershell!) this Convergence Time value for AD repl?



  • #78605

    Curtis Smith

    Hi Jeff, it would help if you explain how you got this time value and what the parts represent. Taking a wild guess I'm thinking 13 minutes, 14 seconds, 1445641 10 millionths of a second. I assume you mean convert it into a timespan, but you really did not say what you wanted to convert it into.

    You could do something like this.

    $timestamp = "PT13M14.1445641S"
    (Select-String -InputObject $timestamp -Pattern "^(\d*?)PT(\d*?)M(\d*?)\.(\d*?)S$").Matches |
    ForEach-Object {
        [System.TimeSpan]::FromMinutes($_.Groups[2].value) +
        [System.TimeSpan]::FromSeconds($_.Groups[3].value) +

You must be logged in to reply to this topic.