SQL MINUTE scalar function in DB2 for i SQL

SQL MINUTE scalar function in DB2 for i SQL
SQL MINUTE scalar function in DB2 for i SQL, sql function, ibmi db2, db2 sql
SQL MINUTE scalar function in DB2 for i SQL

MINUTE

The MINUTE function returns the minute part of a value.

Syntax

MICROSECOND(expression)

the expression must be either time or timestamp or character string or graphic string or numeric data type.

Example

SELECT MINUTE('2024-03-24-10.15.42.123456'), 
   MINUTE(current timestamp),                
   MINUTE(current time)                      
  FROM SYSIBM.SYSDUMMY1  

Output

       MINUTE          MINUTE          MINUTE 
           15              34              34 

Post a Comment

© AS400 and SQL Tricks. All rights reserved. Developed by Jago Desain