ID EN
Date and Time Functions

TIME_FORMAT(time,format)

MySQL 8.4 🇮🇩 Bahasa Indonesia

Ini digunakan seperti fungsi DATE_FORMAT(), namun string format mungkin berisi penentu format hanya untuk jam, menit, detik, dan mikrodetik. Penentu lain menghasilkan NULL atau 0. TIME_FORMAT() mengembalikan NULL jika waktu atau formatnya NULL.

Syntax

MYSQL
SELECT TIME_FORMAT('100:00:00', '%H %k %h %I %l');
'100 100 04 04 4'

Contoh

Example

If the time value contains an hour part that is greater than 23, the %H and %k hour format specifiers produce a value larger than the usual range of 0..23. The other hour format specifiers produce the hour value modulo 12.

MYSQL
SELECT TIME_FORMAT('100:00:00', '%H %k %h %I %l');
'100 100 04 04 4'