Oracle database
SELECT SUBSTR( CURRENT_TIMESTAMP,
1,
8)
FROM DUAL;
Symfoware Server
SELECT SUBSTR( TO_CHAR(CURRENT_TIMESTAMP, 'DD-MON-YY HH.MI.SS.US PM') 1, 8) FROM DUAL;
A datetime value such as CURRENT_TIMESTAMP can be specified for character value expressions.
A datetime value such as CURRENT_TIMESTAMP cannot be specified for character value expressions.
First, specify TO_CHAR for the SUBSTR character value expression.
Specify datetime type (CURRENT_TIMESTAMP, in the example) in firstArg of TO_CHAR, and specify the format template pattern ('DD-MON-YY HH.MI.SS.US PM', in the example) for secondArg to match with the result of SUBSTR before conversion.
TO_CHAR specification format: TO_CHAR(firstArg, secondArg)
Information
Refer to "Data Type Formatting Functions" in the PostgreSQL Documentation for information on format template patterns that can be specified for TO_CHAR in Symfoware Server.