$datetimestringToTimestamp()

Given a date/time string and expected format, convert it to a unix timestamp

Usage

$int = $datetime->stringToTimestamp(string $str, string $format);

Arguments

NameType(s)Description
$strstring

Date/time string

$formatstring

Format of the date/time string in PHP date syntax

Return value

int

Unix timestamp


$datetime methods and properties

API reference based on ProcessWire core version 3.0.251