GH_ConvertStringToDate Method |
Convert a string representing a date into an actual date.
If a pure date is possible it will be returned. If the input is a pure time this method will fail,
you need to use StringToTime instead.
Namespace:
Grasshopper.Kernel
Assembly:
Grasshopper (in Grasshopper.dll)
Syntax public static bool StringToDate(
string text,
ref DateTime date
)
Public Shared Function StringToDate (
text As String,
ByRef date As DateTime
) As Boolean
Parameters
- text
- Type: SystemString
String to parse. - date
- Type: SystemDateTime
If the string could be parsed, the pure date will be returned here.
Return Value
Type:
BooleanTrue if string was successfully parsed, false if not.
See Also