To generate a report, an application with a us_english connection selects book titles and publication dates from a us_english database. Because the report will be sent to Paris, the publication dates must be in a standard French format.
Since the connection’s us_english formats are not acceptable for the date column bind variable, the application needs to set up the bind variable to use French datetime formats.
The application can set up the bind variable for the date column to use French datetime formats as follows:
The application loads a CS_LOCALE structure with French datetime formats.
The application calls ct_bind to bind the date column to a character variable. In the ct_bind call, the CS_DATAFMT structure that describes the bind variable references the CS_LOCALE structure containing the French datetime formats.
When the application calls ct_fetch, the datetime value in the date column is automatically converted to a character string containing French day and month names and copied into the bound variable.