TSTAMPSEP

Specifies a single character to use as the separator between the date and time parts when datetime values are returned from database datetime columns into character output host variables.

When used in addition to DETECTDATE, specifies the explicit datetime format to recognize in character input host variables.

Syntax

TSTAMPSEP='character'

Parameters:

character
Any single character, including:
- (dash character)

When TSTAMPSEP='-' and DETECTDATE is not specified

Character output host variables are returned in the following format:

yyyy-mm-dd-hh.mm.ss.ffffff

When TSTAMPSEP='-' and DETECTDATE is specified

The dash character instructs OpenESQL to look for a specific set of delimiters, including a dash, a space, and a T. For example if you do not specify any alternative date or time formats, and you set TSTAMPSEP to a dash character (-), OpenESQL recognizes the following formats in your input host variables:

  • yyyy-mm-dd-hh.mm.ss.ffffff
  • yyyy-mm-dd hh.mm.ss.ffffff
  • yyyy-mm-dd hh:mm:ss.ffffff
  • yyyy-mm-ddThh.mm.ss.ffffff
  • yyyy-mm-ddThh:mm:ss.ffffff
Any other character

When DETECTDATE is not also specified:

Character output host variables are returned in the following format:

yyyy-mm-ddChh:mm:ss.ffffff

Where C is any character except a dash (-) character, and the number of fractional seconds is platform dependent.

When DETECTDATE is also specified

Character input host variables are returned and scanned using the following format:

yyyy-mm-ddChh:mm:ss.ffffff

Where C is any character except a dash (-) character, and the number of fractional seconds is platform dependent.

Properties:

Default: Space character (ISO 8601 default)

Scope:

Used at compile time: Yes
Behavior at run time: Source file

See Scope - OpenESQL SQL Compiler Directive Options for more information.

Comments:

TSTAMPSEP changes the display format of output host variables as specified.

You can use TSTAMPSEP directive to override the delimiter used in the output format to separate date and time components.