IniFile: GetTimeSpan |
Returns a TimeSpan value from the specified key in the specified section of an INI file.
Public Function GetTimeSpan( ByRef Section As String, ByRef Key As String, Optional ByVal Default As TimeSpan ) As TimeSpan
An INI file contains all values as strings. The value is converted back into a TimeSpan by first attempting to parse the string as a TimeSpan object. If that fails, an attempt is made by testing for a Date value and retrieving the time portion. If an error occurs, then the default is returned.
Passing in Nothing for the default will return TimeSpan.Zero for the default.