GH_ConvertStringToTime Method |
Convert a string representing a time into an pure time. Allowed separators of hour, minute and second
portions are colons, semi-colons, points and commas. Grasshopper itself uses colons when formatting times.
A PM or AM symbol is allowed provided it does not border on any alphabetical characters.
A time can be prefixed by a "X day[s] + " string which defines the total number of 24-hour periods to
include.
Namespace:
Grasshopper.Kernel
Assembly:
Grasshopper (in Grasshopper.dll)
Syntax public static bool StringToTime(
string text,
ref DateTime time
)
Public Shared Function StringToTime (
text As String,
ByRef time As DateTime
) As Boolean
Parameters
- text
- Type: SystemString
String to parse. - time
- Type: SystemDateTime
If the string could be parsed, the pure time will be returned here.
Return Value
Type:
BooleanTrue if string was successfully parsed, false if not.
See Also