%TimePart meta-SQL element

Syntax

%TimePart(DTTM_Column)

Description

%TimePart returns the time portion of the specified datetime column.

Note:

This meta-SQL is not implemented for COBOL.

Parameters

Parameter Description

DTTM_Column

Specify the datetime column to return the time for.

Considerations Using %TimePart

Use %TimeOut meta-SQL when fetching from the database:

%TimeOut(%TimePart(DTTM_COLUMN)) from some_table

If a literal is used as the parameter to %TimePart, it must be wrapped in %DateTimeIn as shown in the following:

insert into some_table values(%TimePart(%DateTimeIn('2001-01-01-12.34.56.789012')))