ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Core.Data Namespace / SQLSyntax Class / Format Method
The value to format.
The type of formatting to perform.

In This Topic
    Format Method
    In This Topic
    Formats the dateTime value into a literal string in the format specified by dateTimeType. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Function Format( _
       ByVal dateTime As Date, _
       ByVal dateTimeType As SQLDateTimeType _
    ) As String

    Parameters

    dateTime
    The value to format.
    dateTimeType
    The type of formatting to perform.

    Return Value

    The formatted DateTime literal string.
    Exceptions
    ExceptionDescription
    dateTimeType is not a field of SQLDateTimeType.
    A geodatabase-related exception has occurred.
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also