hour, minute, second

Prev Next

Function Names

hour, minute, second

Description

These functions extract specific numeric info of the times. 0 is returned if the input value contains no recognizable time.

Function Name Result
hour hour 0-23
minute minute 0-59
second second 0-59

Call as: function

Restrictions

Indirect parameter passing is disabled

Parameter count

1

Parameters

No.TypeDescription
1
input
date or string converted to date Date with time info

Value to extract as described above

Return value

TypeDescription
numeral Result

Returned value as described above

Examples

      a[] = "14. July 2020, 15:30:40";
      echo( hour( a[] ), ", ", minute( a[] ), ", ", second( a[] ) );

Output

15, 30, 40
Try it yourself: Open LIB_Function_hour.b4p in B4P_Examples.zip. Decompress before use.

See also

Date info functions