SAND CDBMS Tools Reference Guide
NDL++ Functions:
Syntax and Examples


Return to String Function Index

 

String Function Syntax and Examples


TIME( )

The TIME() function returns the current time in the specified format. Consult the Data Types section of the SAND CDBMS SQL Reference Guide for information about the time formats acceptable for insertion into TIME-type columns.

Syntax:

TIME(format)  

where:

Format can include any combination of the characters h (hour), m (minute), s (second), and t (millisecond); any ASCII character other than these can be used as a separator. If omitted, the time is returned in the default format (hh:mm:ss). Note that if too few characters are included for a given portion of the time reference, the result is truncated on the left (as in the hours (h) reference specified for table1.col2 in the example below).


Example:

schema1.table1
{
col1 TIME('hh.mm.ss')
col2 TIME('h:mm:ss')
col3 TIME()
}


Results:

At exactly 5:00 pm:

schema1.table1.col1 17.00.00  
schema1.table1.col2  7:00:00 Note: hours value is truncated on the left side
schema1.table1.col3  17:00:00  

 

Return to String Function Index