Product Documentation

SQL Operations Guide

Previous Topic

Next Topic

Default Date Handling

FairCom DB SQL allows for internationalization of date formats. The following configuration option changes the default date handling:

SETENV TPE_DFLT_DATE=XX

or

SETENV_TPE_DFLT_DATE=XX_DFLT_DATE

where XX can be one of the following options:

  • US US_DFLT_DATE
  • UK UK_DFLT_DATE
  • ISO ISO_DFLT_DATE

Changing the default date format affects:

  • The default output format of date values.
  • How SQL interprets date literals in queries and INSERT statements.

The format value determines how FairCom DB SQL interprets character strings inserted as DATE values or compared to DATE columns. For example, a format value of UK_DFLT_DATE allows users to supply date literals in British format (dd/mm/yyyy). The format value also determines the default output format of date data.

The following table details the different formats each supported value. The boldface entries indicate the default output format for each setting.

US_DFLT_DATE

UK_DFLT_DATE

ISO_DFLT_DATE

 

dd-mm-yyyy

 

 

dd/mm/yyyy

 

 

dd-mm-yy

 

 

dd/mm/yy

 

mm-dd-yyyy

 

mm-dd-yyyy

mm/dd/yyy

 

mm/dd/yyy

mm-dd-yy

 

 

mm/dd/yy

 

 

yyyy-mm-dd

yyyy-mm-dd

yyyy-mm-dd

yyyy/mm/dd

yyyy/mm/dd

yyyy/mm/dd

dd-mon-yyyy

dd-mon-yyyy

dd-mon-yyyy

dd/mon/yyyy

dd/mon/yyyy

dd/mon/yyyy

dd-mon-yy

dd-mon-yy

 

dd/mon/yy

dd/mon/yy

 

TOCIndex