Skip to content

DF_DATABASE_DRIVER_DATE_SEPARATOR

Sets the driver date separator for ODBC drivers that do not use the military date format (yyyy-mm-dd).

Level

Database

Supported by

DataFlex ODBC Driver, revision 5 and higher

Type

Integer, temporary

Access

Read/Write

Values

ASCII value of separator character

Syntax

Use cli.pkg
Get_Attribute DF_DATABASE_DRIVER_DATE_SEPARATOR of {driverNumber} {databaseHandle} to {IntegerVariable}
Set_Attribute DF_DATABASE_DRIVER_DATE_SEPARATOR of {driverNumber} {databaseHandle} to {IntegerVariable}

Driver Configuration Keyword

Driver_Date_Separator

Remarks

ODBC demands that drivers use the military format (yyyy-mm-dd) in the supported SQL. Nevertheless, there are drivers that do not use this format, but rather a format that depends on the country settings of the machine or the database client software. For those environments, the driver date separator can be set.

Procedure ShowDBAttribute Integer iDriver Handle hDatabase
    Integer iAttribValue
    Get_Attribute DF_DATABASE_DRIVER_DATE_SEPARATOR of iDriver hDatabase to iAttribValue
    Showln "Date separator: " iAttribValue ", " (Character(iAttribValue))
End_Procedure

The sample code above shows the current setting for a given database. The database handle can be obtained via the DF_DATABASE_ID attribute.