Returns a datetime value from the given {0}. If the given {0} is null , DateTime.From returns null . If the given {0} is ...

Returns a datetime value from the given {0}. If the given {0} is null, DateTime.From returns null.  If the given {0} is datetime, {0} is returned. Values of the following types can be converted to a datetime value:
      
  • text: A datetime value from textual representation. See DateTime.FromText for details.
  • date: A datetime with {0} as the date component and 12:00:00 AM as the time component.
  • datetimezone: The local datetime equivalent of {0}.
  • time: A datetime with the date equivalent of the OLE Automation Date of 0 as the date component and {0} as the time component.
  • number: A datetime equivalent the OLE Automation Date expressed by {0}.
If {0} is of any other type, an error is returned.