Created
April 4, 2015 14:35
-
-
Save peterdalle/f71c9c2fa52c32605fee to your computer and use it in GitHub Desktop.
Convert ISO 8601 duration in the format PT::M::S to seconds
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' https://developers.google.com/resources/api-libraries/documentation/youtube/v3/csharp/latest/classGoogle_1_1Apis_1_1YouTube_1_1v3_1_1Data_1_1VideoContentDetails.html#a0527b84283db20cf2ef8f3de22f65606 | |
Dim ts As TimeSpan = System.Xml.XmlConvert.ToTimeSpan(vid.ContentDetails.Duration) | |
Me.Length = ts.TotalSeconds() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment