StringExtensions.Date(this string str) Method
.NET Standard 2.x
Converts a string whose value is a valid date to a DateTime value.
Namespace: PowerScript.Bridge
Assembly: PowerScript.Bridge.dll
Syntax
public static DateTime? Date(this string str);
Parameters
str
System.String
A string containing a valid date (such as January 1, 2020, or 12-31-99) that you want returned as a DateTime. Datetime can also be an Any variable containing a string.
Returns
System.DateTime
Returns the datetime in the string as a DateTime. If the string contains an invalid date or an incompatible datatype, Date
returns 1900-01-01. If the string is null
, Date
returns null
.
Examples
Coming soon.
Applies to
.NET Standard
2.x