Skip to content

timecodeConvert

Corey Avis edited this page Sep 23, 2026 · 2 revisions

timeCodeConvert

Converts a timecode into seconds.

Usage

timeCodeConvert(string $timecode = '00:00:00'): mixed

Parameters

timecode (string) : The timecode to convert.

Return Value

(mixed) : Returns the converted timecode into a single integer value representing the total duration in seconds. Milliseconds are included only when provided. : Returns false if invalid timecode.

Examples

$fx->timeCodeConvert('3:00') = 180
$fx->timeCodeConvert('23:45:67') = 85567
$fx->timeCodeConvert('-3:00') = -180
$fx->timeCodeConvert('23:45:67.8') = 85567.800

Debug Errors

  • Triggers a warning if the argument is not a valid timecode.

Related Methods

isTimecode | timecode


Home | CoreyFX | Date and Time Processing

Clone this wiki locally